Add conftest

This commit is contained in:
uesyn 2023-10-27 17:50:14 +09:00 committed by Jacob Heider
parent d41fa2a739
commit 468ee034f9

View file

@ -0,0 +1,26 @@
distributable:
url: https://github.com/open-policy-agent/conftest/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
github: open-policy-agent/conftest
build:
dependencies:
go.dev: ^1.21
script: |
go build -ldflags="$LDFLAGS" -o $BUILDLOC .
env:
CGO_ENABLED: 0
LDFLAGS:
- -X github.com/open-policy-agent/conftest/internal/commands.version={{version}}
BUILDLOC: '{{prefix}}/bin/conftest'
provides:
- bin/conftest
test:
dependencies:
gnu.org/grep: '*'
script: |
test "$(conftest --version | grep Conftest:)" = "Conftest: {{version}}"