aports/testing/helm-diff/APKBUILD
Sertonix 927c558779 */*: fix install/source variables
install scripts belong in a single global $install (to allow validation)
and should not be included in $source.

Ref df8e468f0e
2025-05-14 15:54:08 +00:00

46 lines
1.3 KiB
Text

maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
pkgname=helm-diff
pkgver=3.11.0
pkgrel=1
pkgdesc="Helm plugin to preview helm upgrade changes as a diff"
url="https://github.com/databus23/helm-diff"
arch="all"
license="Apache-2.0"
makedepends="go"
install="helm-diff.pre-install"
source="
$pkgname-$pkgver.tar.gz::https://github.com/databus23/helm-diff/archive/refs/tags/v$pkgver.tar.gz
"
options="net" # download Go modules
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
go build -v \
-ldflags "-X github.com/databus23/helm-diff/v3/cmd.Version=v$pkgver"
}
check() {
go test ./...
}
package() {
install -Dm755 $pkgname "$pkgdir/usr/share/helm/plugins/diff/bin/diff"
cat <<-EOF > "$pkgdir/usr/share/helm/plugins/diff/plugin.yaml"
name: "diff"
version: "$pkgver"
usage: "Preview helm upgrade changes as a diff"
description: "Preview helm upgrade changes as a diff"
platformCommand:
- os: "$(go env GOOS)"
arch: "$(go env GOARCH)"
command: "\${HELM_PLUGIN_DIR}/bin/diff"
EOF
}
sha512sums="
04fa0a65e0d6b06a76d64a825208b8cb87b23aff3f3db1f757fecdfc851f155f6d07ff7cb9691faaa1d1f3a16bb7319e46ed8f3db910523d12fece0b6946f029 helm-diff-3.11.0.tar.gz
"