Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mod=vendor to build #205

Merged
merged 1 commit into from
Jul 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,18 @@ install:
ln -sf kubecfg-$v $GOPATH/bin/kubecfg

script:
# 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
- export USE_GO_MOD=no
- |
if [[ ${TRAVIS_GO_VERSION}.0 =~ ^1\.12\. ]]; then
export USE_GO_MOD=yes
make vet
fi
- make
- make test
- if [[ ${TRAVIS_GO_VERSION}.0 =~ ^1\.12\. ]]; then 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 := $(shell echo $${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