Skip to content

Commit

Permalink
Update to build-tools 2.2.1: Golang v1.12.1 and fix GOCACHE (#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Mar 27, 2019
1 parent aaeaadf commit f12bbe9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
File renamed without changes.
6 changes: 4 additions & 2 deletions build-tools/makefile_components/base_build_go.mak
Expand Up @@ -12,13 +12,15 @@ DOCKERBUILDCMD=docker run -t --rm -u $(shell id -u):$(shell id -g)
-e CGO_ENABLED=0 \
-e GOOS=$@ \
-e GOPATH="//workdir/$(GOTMP)" \
-e GOCACHE="//workdir/$(GOTMP)/.cache" \
-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 GOCACHE="//workdir/$(GOTMP)/.cache" \
-e GOFLAGS="$(USEMODVENDOR)" \
-w //workdir \
$(BUILD_IMAGE)
Expand All @@ -32,7 +34,7 @@ GOFILES = $(shell find $(SRC_DIRS) -name "*.go")

BUILD_OS = $(shell go env GOHOSTOS)

BUILD_IMAGE ?= drud/golang-build-container:v1.12
BUILD_IMAGE ?= drud/golang-build-container:v1.12.1

BUILD_BASE_DIR ?= $(PWD)

Expand Down Expand Up @@ -84,7 +86,7 @@ linux darwin windows: pull $(GOFILES)
@echo "building $@ from $(SRC_AND_UNDER)"
@echo $(shell if [ "$(BUILD_OS)" = "windows" ]; then echo "windows build: BUILD_OS=$(BUILD_OS) DOCKER_TOOLBOX_INSTALL_PATH=$(DOCKER_TOOLBOX_INSTALL_PATH) PWD=$(PWD) S=$(S)"; fi )
@mkdir -p $(GOTMP)/{.cache,pkg,src,bin}
$(DOCKERBUILDCMD) \
@$(DOCKERBUILDCMD) \
go install -installsuffix static -ldflags ' $(LDFLAGS) ' $(SRC_AND_UNDER) && touch $@
$( shell if [ -d $(GOTMP) ]; then chmod -R u+w $(GOTMP); fi )
@echo $(VERSION) >VERSION.txt
Expand Down

0 comments on commit f12bbe9

Please sign in to comment.