# Contributor: Hoang Nguyen # Maintainer: Hoang Nguyen pkgname=helmfile pkgver=0.147.0 pkgrel=2 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 " 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=" bfb67b837dc46877fff8b319f2d9bd9da898d4e7d4660636a4f74b3fda27c0689b57d27370a17d3cddfbdb3c863d0abf066a3d9eaf4fbd7c2dd44b06ca9bc571 helmfile-0.147.0.tar.gz "