Skip to content

Commit c8284e3

Browse files
committed
fix travis
1 parent ac14def commit c8284e3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ before_install:
1212
- if [[ "${TRAVIS_PULL_REQUEST_SLUG}" == "nginxinc/nginx-asg-sync" || "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
1313
wget https://github.com/fossas/fossa-cli/releases/download/v1.0.27/fossa-cli_1.0.27_linux_amd64.tar.gz && tar xzf fossa-cli_1.0.27_linux_amd64.tar.gz
1414
&& ./fossa init
15-
&& FOSSA_API_KEY=${fossapush} ./fossa analyze -t nginx-asg-sync -b ${TRAVIS_BRANCH} ; fi
15+
&& GO111MODULE=on FOSSA_API_KEY=${fossapush} ./fossa analyze -t nginx-asg-sync -b ${TRAVIS_BRANCH} ; fi

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
GO_DOCKER_RUN = docker run --rm -v $(shell pwd):/go/src/github.com/nginxinc/nginx-asg-sync -v $(shell pwd)/build_output:/build_output -w /go/src/github.com/nginxinc/nginx-asg-sync/cmd/sync
22
GOLANG_CONTAINER = golang:1.14
33
BUILD_IN_CONTAINER = 1
4+
GOFLAGS ?= -mod=vendor
45

56
all: amazon centos7 ubuntu-xenial amazon2 ubuntu-bionic
67

78
test:
89
ifeq ($(BUILD_IN_CONTAINER),1)
910
$(GO_DOCKER_RUN) $(GOLANG_CONTAINER) go test
1011
else
11-
go test ./...
12+
GO111MODULE=on GOFLAGS='$(GOFLAGS)' go test ./...
1213
endif
1314

1415
lint:
@@ -18,7 +19,7 @@ compile: test
1819
ifeq ($(BUILD_IN_CONTAINER),1)
1920
$(GO_DOCKER_RUN) $(GOLANG_CONTAINER) go build -o /build_output/nginx-asg-sync
2021
else
21-
go build -o ./build_output/nginx-asg-sync github.com/nginxinc/nginx-asg-sync/cmd/sync
22+
GO111MODULE=on GOFLAGS='$(GOFLAGS)' go build -o ./build_output/nginx-asg-sync github.com/nginxinc/nginx-asg-sync/cmd/sync
2223
endif
2324

2425
amazon: compile

0 commit comments

Comments
 (0)