summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Greb2020-11-13 09:20:21 +0100
committerSven Greb2020-11-13 09:20:21 +0100
commitfa6f1f4641badbd04b87e500e3968ade1e5f27c9 (patch)
tree663319cfb28bea15252529bf5ddff46e1cddaefc
parent088fd674cb16dad52f281ff4af3d6c584840e04e (diff)
downloadaur-fa6f1f4641badbd04b87e500e3968ade1e5f27c9.tar.gz
Improve Go module compatiblity
Ensure the "go.mod" file is handled in read-only mode by using the "-mod" flag with the "readonly" value. Also instruct the "go" command to leave newly-created directories in the module cache at their default permissions rather than making them read-only by using the "-modcacherw" flag. Both flags were introduced in Go 1.14.0, see the release notes for more details: https://golang.org/doc/go1.14#go-flags
-rw-r--r--PKGBUILD2
1 files changed, 2 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 55ab0356b610..c95711d962f1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -37,6 +37,8 @@ build() {
go build \
-trimpath \
-buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
-ldflags "-X \"github.com/magefile/mage/mage.timestamp=$build_date\" \
-X \"github.com/magefile/mage/mage.commitHash=$git_commit_hash\" \
-X \"github.com/magefile/mage/mage.gitTag=$git_tag\" \