2023-10-21 00:18:41 +03:00
|
|
|
distributable:
|
|
|
|
url: https://github.com/anchore/grype/archive/v{{version}}.tar.gz
|
|
|
|
strip-components: 1
|
2024-01-31 21:17:07 +03:00
|
|
|
|
2023-10-21 00:18:41 +03:00
|
|
|
versions:
|
|
|
|
github: anchore/grype
|
2024-01-31 21:17:07 +03:00
|
|
|
|
2023-10-21 00:18:41 +03:00
|
|
|
build:
|
|
|
|
dependencies:
|
2024-01-31 21:17:07 +03:00
|
|
|
go.dev: ^1.21
|
2023-10-21 00:18:41 +03:00
|
|
|
script:
|
|
|
|
- go build $GO_ARGS -ldflags="$LD_FLAGS" ./cmd/grype
|
|
|
|
env:
|
|
|
|
LD_FLAGS:
|
|
|
|
- -s -w
|
|
|
|
- -X main.version={{version}}
|
|
|
|
- -X main.gitCommit=pkgx
|
2024-01-31 21:17:07 +03:00
|
|
|
linux:
|
|
|
|
LD_FLAGS:
|
|
|
|
- -buildmode=pie
|
2023-10-21 00:18:41 +03:00
|
|
|
GO_ARGS:
|
|
|
|
- -trimpath
|
|
|
|
- -o="{{prefix}}/bin/grype"
|
2024-01-31 21:17:07 +03:00
|
|
|
|
2023-10-21 00:18:41 +03:00
|
|
|
provides:
|
|
|
|
- bin/grype
|
2024-01-31 21:17:07 +03:00
|
|
|
|
2023-10-21 00:18:41 +03:00
|
|
|
test:
|
2024-01-31 21:17:07 +03:00
|
|
|
- grype --version
|
|
|
|
- grype --version | grep {{version}}
|