Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Forgot to USE_MOD_VENDOR in #61 (#62)
Browse files Browse the repository at this point in the history
* Reintroduce USE_MOD_VENDOR, which got dropped

* Add test before pulling as it should be faster
  • Loading branch information
rfay authored Feb 27, 2019
1 parent 2aeb2c3 commit 64e70f3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions makefile_components/base_build_go.mak
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ DOCKERBUILDCMD=docker run -t --rm -u $(shell id -u):$(shell id -g)
-e CGO_ENABLED=0 \
-e GOOS=$@ \
-e GOPATH="//workdir/$(GOTMP)" \
-e GOFLAGS="$(USEMODVENDOR)" \
-w //workdir \
$(BUILD_IMAGE)

DOCKERTESTCMD=docker run -t --rm -u $(shell id -u):$(shell id -g) \
-v "$(S)$(PWD):/workdir$(DOCKERMOUNTFLAG)" \
-e GOPATH="//workdir/$(GOTMP)" \
-e GOFLAGS="$(USEMODVENDOR)" \
-w //workdir \
$(BUILD_IMAGE)

.PHONY: all build test push clean container-clean bin-clean version static gofmt govet golint golangci-lint container
.PHONY: all build test push clean container-clean bin-clean version static gofmt govet golint golangci-lint container pull
GOTMP=.gotmp

SHELL = /bin/bash
Expand Down Expand Up @@ -73,8 +75,10 @@ ifneq ($(DOCKER_TOOLBOX_INSTALL_PATH),)
endif

build: $(BUILD_OS)

pull:
@docker pull $(BUILD_IMAGE) >/dev/null 2>&1
@if [[ "$(docker images -q $(BUILD_IMAGE) 2> /dev/null)" == "" ]]; then docker pull $(BUILD_IMAGE) >/dev/null 2>&1; fi


linux darwin windows: pull $(GOFILES)
@echo "building $@ from $(SRC_AND_UNDER)"
Expand Down

0 comments on commit 64e70f3

Please sign in to comment.