new file: projects/anchore.com/syft/package.yml

This commit is contained in:
Andrii Riabchenko 2024-02-16 11:34:33 +02:00 committed by Max Howell
parent 697e824f85
commit b094108456

View file

@ -0,0 +1,40 @@
distributable:
url: git+https://github.com/anchore/syft.git
ref: ${{version.tag}}
versions:
github: anchore/syft
build:
dependencies:
go.dev: ^1.21
script:
go build $ARGS -ldflags="$LDFLAGS" ./cmd/syft
env:
COMMIT: $(git describe --always --abbrev=8 --dirty)
DATE: $(date -u +%FT%TZ)
ARGS:
- -trimpath
- -o={{prefix}}/bin/syft
linux:
ARGS:
- -buildmode=pie
LDFLAGS:
- -s
- -w
- -X main.version={{version}}
- -X main.gitCommit=${COMMIT}
- -X main.buildDate=${DATE}
provides:
- bin/syft
test:
dependencies:
curl.se: '*'
script:
- curl -L "${TEST_JSON}" -o micronaut.json
- syft convert micronaut.json | grep 'netty-codec-http2'
- syft --version | grep {{version}}
env:
TEST_JSON: https://raw.githubusercontent.com/anchore/syft/934644232ab115b2518acdb5d240ae31aaf55989/syft/pkg/cataloger/java/test-fixtures/graalvm-sbom/micronaut.json