CI script - go mod creation from scratch w/o GOPROXY to test all dependency fetches

This commit is contained in:
Russ Magee 2022-04-09 19:47:31 -07:00
parent 08b8bd37d5
commit ccebf6f4b3

View file

@ -4,9 +4,10 @@
export GOPATH="${HOME}/go"
export PATH=/usr/local/bin:/usr/bin:/usr/lib/ccache/bin:/bin:$GOPATH/bin
export GO111MODULE=on
# GOCACHE will be phased out in v1.12. [github.com/golang/go/issues/26809]
export GOCACHE="${HOME}/.cache/go-build"
export GO111MODULE=off
export GOPROXY="direct"
#!# GOCACHE will be phased out in v1.12. [github.com/golang/go/issues/26809]
#!export GOCACHE="${HOME}/.cache/go-build"
echo "workdir: ${BACILLUS_WORKDIR}"
mkdir -p "${BACILLUS_ARTFDIR}"
@ -27,6 +28,12 @@ ls
############
stage "Build"
############
echo "Recreating go.mod from scratch ..."
mv go.mod go.mod.git
mv go.sum go.sum.git
go mod init
go mod tidy
echo "Cleaning go mod cache ..."
go clean -modcache
echo "Cleaning go cache ..."