summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSven Greb2020-11-13 09:21:21 +0100
committerSven Greb2020-11-13 09:25:20 +0100
commit7fd8d8d3ae793c16003365bbbbae35fd2f3388ce (patch)
treeeb724c38b632f515ca34d7e7aca83ed6ba7f80b2 /PKGBUILD
parentfa6f1f4641badbd04b87e500e3968ade1e5f27c9 (diff)
downloadaur-7fd8d8d3ae793c16003365bbbbae35fd2f3388ce.tar.gz
Ensure "$LDFLAGS" are expanded correctly
Use brace-based expansion instead of plain environment variable expansion.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD6
1 files changed, 4 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c95711d962f1..2947a696ed84 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -25,7 +25,9 @@ build() {
# file that is recommended by the author.
# The file builds mage when mage itself is not installed on the target system yet and included metadata information
# for the binary.
- # See https://github.com/magefile/mage/blob/master/magefile.go#L47
+ # See:
+ # - https://github.com/magefile/mage/blob/5bc3a8ab/magefile.go#L55
+ # - https://github.com/magefile/mage/blob/5bc3a8ab/magefile.go#L95
local build_date git_commit_hash git_tag
build_date=$(command date --rfc-3339=seconds)
git_commit_hash=$(git rev-parse --short HEAD)
@@ -42,7 +44,7 @@ build() {
-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\" \
- -extldflags $LDFLAGS" \
+ -extldflags \"${LDFLAGS}\"" \
-o build/"$pkgname" .
}