blob: 167314361b155b38887da84e7f0e7f763bb5b202 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Contributor: Hoang Nguyen <folliekazetani@protonmail.com>
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
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
"
|