Point GOCACHE to CI cache dir

This commit is contained in:
Tulir Asokan 2020-10-19 02:19:34 +03:00
parent 1af8260ddc
commit 38bfafbe3a

View file

@ -13,6 +13,7 @@ stages:
- apk add build-base olm-dev
- mkdir -p .cache
- export GOPATH="$CI_PROJECT_DIR/.cache"
- export GOCACHE="$CI_PROJECT_DIR/.cache/build"
- export GO_LDFLAGS="-X main.Tag=$CI_COMMIT_TAG -X main.Commit=$CI_COMMIT_SHA -X 'main.BuildTime=`date '+%b %_d %Y, %H:%M:%S'`'"
script:
- go build -ldflags "$GO_LDFLAGS" -o mautrix-whatsapp
@ -43,6 +44,7 @@ build static:
before_script:
- mkdir -p .cache
- export GOPATH="$CI_PROJECT_DIR/.cache"
- export GOCACHE="$CI_PROJECT_DIR/.cache/build"
- export GO_LDFLAGS="-X main.Tag=$CI_COMMIT_TAG -X main.Commit=$CI_COMMIT_SHA -X 'main.BuildTime=`date '+%b %_d %Y, %H:%M:%S'`'"
variables:
CGO_ENABLED: 0