summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Swift2020-05-25 11:15:28 -0400
committerMikhail Swift2020-05-25 11:15:28 -0400
commite74ce93a28d2871413b95e1ef720c8e6d2716128 (patch)
treecca9ea84452b30d97da159932d664dfcc0ef97f6
parentf31b4cca292e173b8328a780dc6f1804f6262332 (diff)
downloadaur-e74ce93a28d2871413b95e1ef720c8e6d2716128.tar.gz
Properly pass in version to go build ldflags option
* Set extflags to the LDFLAGS environment variable * Re-add main.version ldflag for go link
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD5
2 files changed, 3 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1bbc79c01459..bd732f0d37ae 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = lazydocker
pkgdesc = A simple terminal UI for docker and docker-compose, written in Go with the gocui library.
pkgver = 0.8
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/jesseduffield/lazydocker
arch = 1686
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index ea9548ae15ef..47cfbd2f4067 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Mikhail Swift <mikhail.swift@gmail.com>
pkgname=lazydocker
pkgver=0.8
-pkgrel=2
+pkgrel=3
pkgdesc='A simple terminal UI for docker and docker-compose, written in Go with the gocui library.'
arch=('1686' 'x86_64' 'armv7h' 'armv6h' 'aarch64')
url='https://github.com/jesseduffield/lazydocker'
@@ -15,9 +15,8 @@ build() {
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
- export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
- go build -o ${pkgname} main.go
+ go build -o ${pkgname} -ldflags "-extldflags ${LDFLAGS} -s -w -X main.version=${pkgver}" main.go
}
package() {