Skip to content

Commit

Permalink
Merge pull request #10863 from pdeslaur/grype
Browse files Browse the repository at this point in the history
grype: Fix package version
  • Loading branch information
pdeslaur authored Jan 8, 2024
2 parents 608bf35 + 5503fbe commit ebf9923
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions grype.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: grype
version: 0.74.0
epoch: 0
epoch: 1
description: Vulnerability scanner for container images, filesystems, and SBOMs
copyright:
- license: Apache-2.0
Expand All @@ -12,17 +12,20 @@ environment:
- busybox
- ca-certificates-bundle
- go
environment:
CGO_ENABLED: "0"

pipeline:
- uses: fetch
with:
uri: https://github.com/anchore/grype/archive/v${{package.version}}/grype-${{package.version}}.tar.gz
expected-sha512: b90270cf6cbefefeccd89e3a12633d2db6fb920e14f19bc994208393e31bf8b88d45d2ce6add20589e97ed4f0ad8ca6dd6f84b624083935def366fd191478788

- runs: |
CGO_ENABLED=0 go build \
-ldflags "-w -X github.com/anchore/grype/internal/version.version=${{package.version}}" \
-o "${{targets.destdir}}/usr/bin/grype" ./cmd/grype
- uses: go/build
with:
packages: ./cmd/grype
ldflags: -w -X main.version=${{package.version}}
output: grype

- uses: strip

Expand All @@ -31,3 +34,12 @@ update:
github:
identifier: anchore/grype
strip-prefix: v

test:
environment:
contents:
packages:
- wolfi-base
pipeline:
- runs: |
grype --version

0 comments on commit ebf9923

Please sign in to comment.