Skip to content

Commit

Permalink
feat: add function to dynamically determine package version for PKGBUILD
Browse files Browse the repository at this point in the history
  • Loading branch information
timwehrle committed Oct 21, 2024
1 parent e168780 commit cdf78a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ makedepends=('go>=1.21')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('SKIP')

pkgver() {
cd "$pkgname"
git describe --tags | sed 's/^v//;s/-.*//'
}

build() {
cd "$pkgname-$pkgver"
CGO_ENABLED=0 \
Expand Down

0 comments on commit cdf78a0

Please sign in to comment.