diff options
author | Caleb Maclennan | 2022-02-01 23:49:02 +0300 |
---|---|---|
committer | Caleb Maclennan | 2022-02-01 23:49:02 +0300 |
commit | 759c0557d981a4d6bba5aa8d4cdec71460d7f97f (patch) | |
tree | 4e2ef9d80cc0e1682337d50ad0d3ec4809b8eaed | |
parent | ec2ce4342265dd6d576caed19bdb1088ff302406 (diff) | |
download | aur-759c0557d981a4d6bba5aa8d4cdec71460d7f97f.tar.gz |
upgpkg: gojq 0.12.6-3
Simplify bumps by detecting commit hash
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 10 |
2 files changed, 8 insertions, 5 deletions
@@ -1,11 +1,12 @@ pkgbase = gojq pkgdesc = Pure go implementation of jq pkgver = 0.12.6 - pkgrel = 2 + pkgrel = 3 url = https://github.com/itchyny/gojq arch = x86_64 license = MIT makedepends = go + makedepends = git depends = glibc source = https://github.com/itchyny/gojq/archive/v0.12.6/gojq-0.12.6.tar.gz sha256sums = 46f66af22e1701dd6f3605012c6e3ccc5bf4dc2ad1a8a7f5be248cb7c6bf316c @@ -3,13 +3,13 @@ pkgname=gojq pkgver=0.12.6 -_pkgrev=886515f -pkgrel=2 +pkgrel=3 pkgdesc='Pure go implementation of jq' url="https://github.com/itchyny/$pkgname" arch=(x86_64) license=(MIT) -makedepends=(go) +makedepends=(go + git) depends=(glibc) _archive="$pkgname-$pkgver" source=("$url/archive/v$pkgver/$_archive.tar.gz") @@ -21,14 +21,16 @@ prepare(){ } build() { + local _commit=$(zcat ${source[0]##*/} | git get-tar-commit-id) cd "$_archive" export CGO_LDFLAGS="$LDFLAGS" export CGO_CFLAGS="$CFLAGS" export CGO_CPPFLAGS="$CPPFLAGS" export CGO_CXXFLAGS="$CXXFLAGS" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" go build -o build \ - -ldflags="-X ${url#*//}/cli.revision=$_pkgrev" \ + -ldflags="-X ${url#*//}/cli.revision=${_commit:0:7}" \ "./cmd/$pkgname" } |