mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 19:55:26 +03:00
60 lines
2 KiB
Text
60 lines
2 KiB
Text
# Contributor: Hoang Nguyen <folliekazetani@protonmail.com>
|
|
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
|
|
pkgname=helmfile
|
|
pkgver=0.151.0
|
|
pkgrel=0
|
|
pkgdesc="Declarative spec for deploying helm charts"
|
|
url="https://helmfile.readthedocs.io/"
|
|
arch="all"
|
|
license="MIT"
|
|
depends="helm"
|
|
makedepends="go"
|
|
checkdepends="bash"
|
|
subpackages="
|
|
$pkgname-bash-completion
|
|
$pkgname-zsh-completion
|
|
$pkgname-fish-completion
|
|
"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/helmfile/helmfile/archive/refs/tags/v$pkgver.tar.gz"
|
|
|
|
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
|
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
|
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
|
|
|
build() {
|
|
local _goldflags="
|
|
-X go.szostok.io/version.version=$pkgver
|
|
-X go.szostok.io/version.buildDate=$(date -u "+%Y-%m-%dT%H:%M:%S%z" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})
|
|
-X go.szostok.io/version.commitDate=$(date -u "+%Y-%m-%dT%H:%M:%S%z" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})
|
|
-X go.szostok.io/version.commit=0000000
|
|
-X go.szostok.io/version.dirtyBuild=false
|
|
-X github.com/helmfile/helmfile/pkg/runtime.v1Mode=true
|
|
"
|
|
go build -v -o helmfile -ldflags "$_goldflags"
|
|
|
|
for shell in bash fish zsh; do
|
|
./helmfile completion $shell > $pkgname.$shell
|
|
done
|
|
}
|
|
|
|
check() {
|
|
# e2e/template test requires docker
|
|
# NOTE: run tests for `tmpl` module again in the next release
|
|
# (https://github.com/helmfile/helmfile/blob/6a36f34c7db20e95fdac16bd835c4751012ceb16/pkg/tmpl/context_funcs_test.go#L361)
|
|
go test $(go list ./... | grep -v /e2e | grep -v /tmpl)
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
|
|
|
|
install -Dm644 helmfile.bash \
|
|
"$pkgdir"/usr/share/bash-completion/completions/helmfile
|
|
install -Dm644 helmfile.zsh \
|
|
"$pkgdir"/usr/share/zsh/site-functions/_helmfile
|
|
install -Dm644 helmfile.fish \
|
|
"$pkgdir"/usr/share/fish/completions/helmfile.fish
|
|
}
|
|
|
|
sha512sums="
|
|
c55bfd0345e605ce5278e91c9901163f410f027e2ca11204873553c5278ef181a4a11ab91895a19c3b29b43c1b608ae5b4c649a72842823b8fd0451e11d1c471 helmfile-0.151.0.tar.gz
|
|
"
|