Skip to content

Commit

Permalink
Merge pull request #49 from derektamsen/add-make-deploy-tar
Browse files Browse the repository at this point in the history
add deploytar and lint make targets
  • Loading branch information
derektamsen authored Apr 11, 2020
2 parents 9b4503e + c9ab929 commit 022d615
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ addons:
- libcryptsetup-dev

script:
- diff -u <(echo -n) <(gofmt -d .)
- make lint
- make test

jobs:
Expand All @@ -27,9 +27,7 @@ jobs:
go: 1.14.x
script: make build
before_deploy:
- mkdir -p tmp/luks2crypt
- cp bin/luks2crypt README.md COPYING LICENSE.txt tmp/luks2crypt/
- tar -C tmp -czvf luks2crypt-${TRAVIS_TAG}-${GIMME_OS}-${GIMME_ARCH}.tar.gz luks2crypt
- make deploytar
deploy:
provider: releases
edge: true
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ install:
build:
$(GOBUILD) $(LDFLAGS) -o $(BINPATH)/$(BINARY_NAME) -v ./cmd/$(BINARY_NAME)

deploytar:
mkdir -p tmp/$(BINARY_NAME)
cp bin/$(BINARY_NAME) README.md COPYING LICENSE.txt tmp/$(BINARY_NAME)/
tar -C tmp -czvf $(BINARY_NAME)-${TRAVIS_TAG}-${GIMME_OS}-${GIMME_ARCH}.tar.gz $(BINARY_NAME)

lint:
GO111MODULE=off go get -u golang.org/x/lint/golint
golint -set_exit_status ./...
go vet ./...

test:
$(GOTEST) -v ./...

Expand Down

0 comments on commit 022d615

Please sign in to comment.