github.com/helmfile/vals (#3566)

* github.com/helmfile/vals

* test with vals --help

* fix typo

* update test to match stderr output

* remove useless and incorrect display-name property

* fix GitHub version

* enable cgo

* add buildmode=pie to go build args for linux
This commit is contained in:
Zadkiel Aharonian 2023-10-08 02:35:37 +02:00 committed by GitHub
parent 2ba668fa25
commit 66e988cd6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,31 @@
distributable:
url: https://github.com/helmfile/vals/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
github: helmfile/vals
provides:
- bin/vals
build:
dependencies:
go.dev: '*'
script:
- go mod download
- mkdir -p "{{ prefix }}"/bin
- go build $GOARGS -trimpath -ldflags="$LDFLAGS" -o "{{ prefix }}"/bin/vals ./cmd/vals
env:
LDFLAGS:
- -w
- -s
- -X main.version=v{{version}}
linux:
GOARGS:
- -buildmode=pie
test:
- vals --help 2>&1 | grep "vals is a Helm-like configuration"
# Some versions of vals had no command to print the version
- echo $(vals version || true) | grep "v{{version}}" || \
vals --help 2>&1 | grep -v "Print vals version"