summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Denhartog2020-07-11 03:31:25 -0700
committerBenjamin Denhartog2020-07-11 03:31:25 -0700
commit3bd5357f4786dc53107faf78a793ddf46758220e (patch)
treebba454f8a7e933905a81b4a91b7212b6c65acc90
parent30bdaa251a91b5208c925c82c307ddd042458c14 (diff)
downloadaur-3bd5357f4786dc53107faf78a793ddf46758220e.tar.gz
feat(terragrunt): set GOPATH to a path within $srcdir
This patch sets GOPATH to a path within $srcdir, which helps to "sandbox" the build of this package for users invoking `makepkg` directly or through the use of an AUR helper (instead of in a chroot or real container). We avoid cleaning this cache after builds so that A) future builds can re-use the cache, B) we don't remove the compiled executable, and C) it is not the responsibility of this package nor is it an expectation of `makepkg` that there are no side-effects (files left over on disk). closes #30
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD4
2 files changed, 4 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1c8cc996a09b..c3de8dcb69dc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = terragrunt
pkgdesc = A thin wrapper for Terraform that provides extra tools for working with multiple Terraform modules
pkgver = 0.23.31
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/gruntwork-io/terragrunt
arch = x86_64
license = MIT
diff --git a/PKGBUILD b/PKGBUILD
index 178ed6b7989a..5e619d782b65 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=terragrunt
pkgver=0.23.31
-pkgrel=1
+pkgrel=2
pkgdesc="A thin wrapper for Terraform that provides extra tools for working with multiple Terraform modules"
url="https://github.com/gruntwork-io/terragrunt"
arch=('x86_64')
@@ -20,6 +20,8 @@ sha256sums=('7bb9859fd968220bcae1908079448834a789fca03d644d405a61441cd4a655a2')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ export GOPATH="${srcdir}/.go"
+
go build \
-ldflags "-X github.com/gruntwork-io/terragrunt.VERSION=${pkgver}" \
-o "${pkgname}-${pkgver}" \