diff --git a/projects/anchore.com/syft/package.yml b/projects/anchore.com/syft/package.yml new file mode 100644 index 00000000..73d281a7 --- /dev/null +++ b/projects/anchore.com/syft/package.yml @@ -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