summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDavid McKay2017-10-09 14:40:16 +0100
committerDavid McKay2017-10-09 14:40:16 +0100
commit61dae981bc01168455afdde290163f93549af33a (patch)
tree8c08205f20384192c26b45c6d93c1a9fc0339516 /PKGBUILD
parent09d8d5bd3f790c374441b851da64e788df6da19d (diff)
downloadaur-61dae981bc01168455afdde290163f93549af33a.tar.gz
Using same build steps at openfaas-cli. I should probably just parse the Dockerfile. Next time
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD5
1 files changed, 4 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4b0ae3eed9ab..759f2f2e4f78 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,7 +14,10 @@ sha256sums=('9350c345484ba217645af1e75487725159d2eceff21518265b751f05f7083f4e')
build() {
cd "$srcdir/faas-cli-$pkgver"
- go build -o faas-cli .
+
+ VERSION=$(git describe --all --exact-match `git rev-parse HEAD` | grep tags | sed 's/tags\///')
+ GIT_COMMIT=$(git rev-list -1 HEAD)
+ CGO_ENABLED=0 GOOS=linux go build --ldflags "-s -w -X github.com/openfaas/faas-cli/commands.GitCommit=${GIT_COMMIT} -X github.com/openfaas/faas-cli/commands.Version=${VERSION}" -a -installsuffix cgo -o faas-cli .
}
package() {