Skip to content

Commit

Permalink
Add mod=vendor to build
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Mikulicic committed Jul 26, 2019
1 parent 02326ab commit da0acb8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,17 @@ install:
script:
- make
- make test
- if [[ ${TRAVIS_GO_VERSION}.0 =~ ^1\.12\. ]]; then make vet; fi
# We want to support both go.mod aware builds and legacy builds.
# Instead of adding more combinations to the build matrix,
# we're going to use go 1.12 for the go.mod aware build
# and test the legacy build with go 1.11
# (since the go.mod file defines 1.12 as the minimum version already)
- export USE_GO_MOD=no
- |
if [[ ${TRAVIS_GO_VERSION}.0 =~ ^1\.12\. ]]; then
export USE_GO_MOD=yes
make vet
fi
- make kubeseal-static
- EXE_NAME=kubeseal-$(go env GOOS)-$(go env GOARCH)
- cp kubeseal-static $EXE_NAME
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
GO = go
GO_FLAGS =
GOFMT = gofmt

USE_GO_MOD -= yes
ifeq ($(USE_GO_MOD),yes)
export GO111MODULE = on
GO_FLAGS = -mod=vendor
else
export GO111MODULE = off
GO_FLAGS =
endif

KUBECFG = kubecfg -U https://github.com/bitnami-labs/kube-libsonnet/raw/52ba963ca44f7a4960aeae9ee0fbee44726e481f
DOCKER = docker
GINKGO = ginkgo -p
Expand Down

0 comments on commit da0acb8

Please sign in to comment.