diff options
author | Matthias Lisin | 2020-05-07 23:03:37 +0200 |
---|---|---|
committer | Matthias Lisin | 2020-05-07 23:03:37 +0200 |
commit | d0bcda25adc1607d977eee9038c68f3721a7e84a (patch) | |
tree | 1e2e9916fa2ef5bab96c3cb6160e9c8fb306d1c5 | |
download | aur-d0bcda25adc1607d977eee9038c68f3721a7e84a.tar.gz |
newpkg: helm-diff 3.1.1-1
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 46 | ||||
-rw-r--r-- | helm-diff.install | 4 |
4 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3e0ab6b8d030 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = helm-diff + pkgdesc = Helm plugin that shows a diff explaining what a helm upgrade would change + pkgver = 3.1.1 + pkgrel = 1 + url = https://github.com/databus23/helm-diff + install = helm-diff.install + arch = x86_64 + license = Apache + makedepends = git + makedepends = go + depends = glibc + source = helm-diff-3.1.1.tar.gz::https://github.com/databus23/helm-diff/archive/v3.1.1.tar.gz + sha256sums = 3a077e964ba9b06e3489875f76491bbe4bb53c1131c19d49b8d9cfd7b5aa8606 + +pkgname = helm-diff + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..695e2a016807 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/pkg/ +/src/ +/*.log +/*.tar.gz +/*.pkg.tar* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..752fe54e7d7f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: ml <ml@visu.li> +pkgname=helm-diff +pkgver=3.1.1 +pkgrel=1 +pkgdesc='Helm plugin that shows a diff explaining what a helm upgrade would change' +arch=('x86_64') +url='https://github.com/databus23/helm-diff' +license=('Apache') +install=helm-diff.install +depends=('glibc') +# `go mod init` wants git +makedepends=('git' 'go') +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") +sha256sums=('3a077e964ba9b06e3489875f76491bbe4bb53c1131c19d49b8d9cfd7b5aa8606') + +prepare() { + cd "${pkgname}-${pkgver}" + # fails when go.mod present from previous run + [[ ! -f go.mod ]] && go mod init github.com/databus23/helm-diff + # go mod init didn't catch stretchr/testify + go mod edit -require github.com/stretchr/testify@v1.5.1 + # `go mod download` fails to get all required modules and `go build -mod=readonly` fails + go mod tidy + sed -i '/^hooks:$/Q' plugin.yaml +} + +build() { + cd "${pkgname}-${pkgver}" + export CGO_LDFLAGS="$LDFLAGS" + export CGO_CFLAGS="$CFLAGS" + export CGO_CPPFLAGS="$CPPFLAGS" + export CGO_CXXFLAGS="$CXXFLAGS" + export GOFLAGS='-buildmode=pie -trimpath -modcacherw -mod=readonly' + go build -o bin/diff -ldflags "-X github.com/databus23/helm-diff/cmd.Version=${pkgver}" +} + +check() { + cd "${pkgname}-${pkgver}" + go test ./... +} + +package() { + cd "${pkgname}-${pkgver}" + install -Dm755 bin/diff -t "${pkgdir}/usr/lib/helm/plugins/helm-diff/bin" + install -m644 plugin.yaml -t "${pkgdir}/usr/lib/helm/plugins/helm-diff" +} diff --git a/helm-diff.install b/helm-diff.install new file mode 100644 index 000000000000..6c17ca71d07f --- /dev/null +++ b/helm-diff.install @@ -0,0 +1,4 @@ +post_install() { + echo "Run the following command to finish plugin installation:" + echo -e "\thelm plugin install /usr/lib/helm/plugins/helm-diff" +} |