From d4bb4941ddb6b9fc9cca7b0e3e5eb1ee35d42c2f Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Wed, 31 Jan 2024 13:17:07 -0500 Subject: [PATCH] fix(grype) closes #5068 --- projects/github.com/anchore/grype/package.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/projects/github.com/anchore/grype/package.yml b/projects/github.com/anchore/grype/package.yml index 581c52b0..0211032a 100644 --- a/projects/github.com/anchore/grype/package.yml +++ b/projects/github.com/anchore/grype/package.yml @@ -1,11 +1,13 @@ distributable: url: https://github.com/anchore/grype/archive/v{{version}}.tar.gz strip-components: 1 + versions: github: anchore/grype + build: dependencies: - go.dev: '*' + go.dev: ^1.21 script: - go build $GO_ARGS -ldflags="$LD_FLAGS" ./cmd/grype env: @@ -13,11 +15,16 @@ build: - -s -w - -X main.version={{version}} - -X main.gitCommit=pkgx + linux: + LD_FLAGS: + - -buildmode=pie GO_ARGS: - -trimpath - -o="{{prefix}}/bin/grype" + provides: - bin/grype + test: - script: - - grype --version | grep {{version}} + - grype --version + - grype --version | grep {{version}}