8000 Add function to dynamically determine package version for PKGBUILD by timwehrle · Pull Request #186 · Boeing/config-file-validator · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add function to dynamically determine package version for PKGBUILD #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ arch=('x86_64')
url="https://github.com/Boeing/config-file-validator"
license=('Apache 2.0')
depends=('glibc')
makedepends=('go>=1.21' 84E2 ;)
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
makedepends=('go>=1.21' 'git' 'sed')
source=("git+https://github.com/Boeing/config-file-validator.git")
sha256sums=('SKIP')
md5sums=('SKIP')

pkgver() {
cd "$srcdir/$pkgname"
git describe --tags --abbrev=0 | sed 's/^v//'
}

build() {
cd "$pkgname-$pkgver"
cd "$srcdir/$pkgname"
CGO_ENABLED=0 \
GOOS=linux \
GOARCH=amd64 \
Expand All @@ -26,6 +32,6 @@ build() {
}

package() {
cd "$pkgname-$pkgver"
cd "$srcdir/$pkgname"
install -Dm755 validator "$pkgdir/usr/bin/validator"
}
Loading
0