Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
Ensure we always build from vendored deps, and test for mod tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
nickatsegment committed Jul 9, 2019
1 parent 11c2803 commit 344f6fe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ jobs:
name: Test
command: |
make test
- run:
name: Check modules are tidy and checked in
command: |
export GO111MODULE=on
go mod tidy
go mod vendor
if [ "$(git status --porcelain)" != "" ]; then
echo "git tree is dirty after tidying and vendoring modules"
echo "ensure go.mod and go.sum are tidy and vendor is checked in"
git status
exit 1
fi
dist-linux:
docker:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
*~
*.sw[a-z]
vendor/*/
dist/
packagecloud.conf.json
aws-okta
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ dist/:
mkdir -p dist

dist/aws-okta-$(VERSION)-darwin-amd64: | dist/
GOOS=darwin GOARCH=amd64 GO111MODULE=on go build $(LDFLAGS) -o $@
GOOS=darwin GOARCH=amd64 GO111MODULE=on go build -mod=vendor $(LDFLAGS) -o $@

dist/aws-okta-$(VERSION)-linux-amd64: | dist/
GOOS=linux GOARCH=amd64 GO111MODULE=on go build $(LDFLAGS) -o $@
GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor $(LDFLAGS) -o $@

.PHONY: clean all

0 comments on commit 344f6fe

Please sign in to comment.