Skip to content

Commit

Permalink
Merge pull request #37 from derektamsen/change-pkg-structure
Browse files Browse the repository at this point in the history
restructure luks2crypt package to fit in cmd/, internal/, pkg/, tools/
  • Loading branch information
derektamsen authored Jun 27, 2019
2 parents 9ac1594 + b1622df commit 231d1af
Show file tree
Hide file tree
Showing 16 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
include:
- stage: build
go: 1.12.x
script: go build -v -ldflags "-X main.VERSION=${TRAVIS_TAG}"
script: go build -v -ldflags "-X main.VERSION=${TRAVIS_TAG}" ./cmd/...
deploy:
provider: releases
file: luks2crypt-${TRAVIS_TAG}-${GIMME_OS}-${GIMME_ARCH}.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG LUKS2CRYPT_VER='7213ec6894a6f368375a290de81c17f56190c20e'

# golang variables
ARG GO111MODULE='on'
ARG GOLANGVER='1.11.5'
ARG GOLANGVER='1.12.6'
ARG GOPATH='/go'
ENV PATH=${PATH}:/usr/local/go/bin:/go/bin

Expand Down Expand Up @@ -48,7 +48,7 @@ WORKDIR /go/src/github.com/square/luks2crypt
COPY . .

# go build and install luks2crypt
RUN go install -ldflags "-X main.VERSION=${LUKS2CRYPT_VER}" -v ./...
RUN go install -ldflags "-X main.VERSION=${LUKS2CRYPT_VER}" -v ./cmd/...

# run and print the version of luks2crypt
ENTRYPOINT [ "luks2crypt" ]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ through cgo to manage the encrypted devices. On debian/ubuntu you can run:

- Standard go tools can be used to build luks2crypt:

go build
go build ./cmd/...

- If you would like to use a mock crypt server to test client changes on is
included in this project:

go build tools/cryptservermock/cryptservermock.go
go build ./tools/...

- If you need a test enviornment, the provided `Vagrantfile` creates an ubuntu
vm. The vagrantfile has a provision script that creates a luks disk image at
Expand Down
2 changes: 1 addition & 1 deletion main.go → cmd/luks2crypt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"log"
"os"

"github.com/square/luks2crypt/postimaging"
"github.com/square/luks2crypt/pkg/postimaging"

cli "gopkg.in/urfave/cli.v1"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions postimaging/postimaging.go → pkg/postimaging/postimaging.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"log"
"net/http"

"github.com/square/luks2crypt/escrow"
"github.com/square/luks2crypt/hwinfo"
"github.com/square/luks2crypt/localcache"
"github.com/square/luks2crypt/luks"
"github.com/square/luks2crypt/password"
"github.com/square/luks2crypt/internal/escrow"
"github.com/square/luks2crypt/internal/hwinfo"
"github.com/square/luks2crypt/internal/localcache"
"github.com/square/luks2crypt/internal/luks"
"github.com/square/luks2crypt/internal/password"
)

// Opts is used to store the options needed for postimaging functions
Expand Down

0 comments on commit 231d1af

Please sign in to comment.