diff --git a/projects/conftest.dev/package.yml b/projects/conftest.dev/package.yml new file mode 100644 index 00000000..aad9ee1d --- /dev/null +++ b/projects/conftest.dev/package.yml @@ -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}}"