Drop workarounds for Go 1.11 and Go 1.12

This commit is contained in:
Jakob Unterwurzacher 2021-08-18 17:41:33 +02:00
parent a5f88e86d1
commit b2abb0484f
2 changed files with 2 additions and 14 deletions

View File

@ -51,7 +51,7 @@ ci:
go clean -modcache go clean -modcache
# GOPROXY=off makes sure we fail instead of making network requests # GOPROXY=off makes sure we fail instead of making network requests
# (we should not need any!) # (we should not need any!)
# "-mod=vendor" is required for Go 1.11 # "-mod=vendor" is required for Go 1.13
GOPROXY=off ./build.bash -mod=vendor GOPROXY=off ./build.bash -mod=vendor
# Delete "vendor" dir # Delete "vendor" dir
rm -R vendor rm -R vendor

View File

@ -15,10 +15,6 @@ cd "$(dirname "$0")"
# Make sure we have the go binary # Make sure we have the go binary
go version > /dev/null go version > /dev/null
# Enable Go Modules on Go 1.11 and 1.12
# https://dev.to/maelvls/why-is-go111module-everywhere-and-everything-about-go-modules-24k#-raw-go111module-endraw-with-go-111-and-112
export GO111MODULE=on
# GOPATH may contain multiple paths separated by ":" # GOPATH may contain multiple paths separated by ":"
GOPATH1=$(go env GOPATH | cut -f1 -d:) GOPATH1=$(go env GOPATH | cut -f1 -d:)
@ -65,15 +61,7 @@ fi
# Only set GOFLAGS if it is not already set by the user # Only set GOFLAGS if it is not already set by the user
if [[ -z ${GOFLAGS:-} ]] ; then if [[ -z ${GOFLAGS:-} ]] ; then
GOFLAGS=""
# For reproducible builds, we get rid of $HOME references in the
# binary using "-trimpath".
# However, -trimpath needs Go 1.13+, and we support Go 1.11 and Go 1.12
# too. So don't add it there.
GV=$(go version)
if [[ $GV != *"1.11"* && $GV != *"1.12"* ]] ; then
GOFLAGS="-trimpath" GOFLAGS="-trimpath"
fi
# Also, Fedora and Arch want pie enabled, so enable it. # Also, Fedora and Arch want pie enabled, so enable it.
# * https://fedoraproject.org/wiki/Changes/golang-buildmode-pie # * https://fedoraproject.org/wiki/Changes/golang-buildmode-pie
# * https://github.com/rfjakob/gocryptfs/pull/460 # * https://github.com/rfjakob/gocryptfs/pull/460