diff options
author | Sven Greb | 2020-11-13 09:20:21 +0100 |
---|---|---|
committer | Sven Greb | 2020-11-13 09:20:21 +0100 |
commit | fa6f1f4641badbd04b87e500e3968ade1e5f27c9 (patch) | |
tree | 663319cfb28bea15252529bf5ddff46e1cddaefc /PKGBUILD | |
parent | 088fd674cb16dad52f281ff4af3d6c584840e04e (diff) | |
download | aur-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
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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\" \ |