mirror of
https://github.com/anchore/syft
synced 2024-11-10 06:14:16 +00:00
update goreleaser with windows checksums (#740)
* update goreleaser with windows checksums Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com> * update format to be closer to our previous implementation Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com> * remove linux replacement Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com> * typo Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
parent
b77ddfc29c
commit
dfefd2ea4e
1 changed files with 14 additions and 24 deletions
|
@ -13,28 +13,10 @@ builds:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
goarch:
|
|
||||||
- amd64
|
|
||||||
- arm64
|
|
||||||
# Set the modified timestamp on the output binary to the git timestamp (to ensure a reproducible build)
|
|
||||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
|
||||||
ldflags: |
|
|
||||||
-w
|
|
||||||
-s
|
|
||||||
-extldflags '-static'
|
|
||||||
-X github.com/anchore/syft/internal/version.version={{.Version}}
|
|
||||||
-X github.com/anchore/syft/internal/version.gitCommit={{.Commit}}
|
|
||||||
-X github.com/anchore/syft/internal/version.buildDate={{.Date}}
|
|
||||||
-X github.com/anchore/syft/internal/version.gitTreeState={{.Env.BUILD_GIT_TREE_STATE}}
|
|
||||||
|
|
||||||
- binary: syft
|
|
||||||
id: syft-win
|
|
||||||
env:
|
|
||||||
- CGO_ENABLED=0
|
|
||||||
goos:
|
|
||||||
- windows
|
- windows
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
|
- arm64
|
||||||
# Set the modified timestamp on the output binary to the git timestamp (to ensure a reproducible build)
|
# Set the modified timestamp on the output binary to the git timestamp (to ensure a reproducible build)
|
||||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||||
ldflags: |
|
ldflags: |
|
||||||
|
@ -68,14 +50,19 @@ builds:
|
||||||
-X github.com/anchore/syft/internal/version.gitTreeState={{.Env.BUILD_GIT_TREE_STATE}}
|
-X github.com/anchore/syft/internal/version.gitTreeState={{.Env.BUILD_GIT_TREE_STATE}}
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
|
||||||
builds:
|
id: syft
|
||||||
- syft # i.e. Linux only
|
replacements:
|
||||||
|
windows: Windows
|
||||||
|
amd64: x86_64
|
||||||
|
format_overrides:
|
||||||
|
- goos: windows
|
||||||
|
format: zip
|
||||||
|
|
||||||
- format: zip # This is a hack for syft-macos! We don't actually intend to use _this_ ZIP file, we just need goreleaser to consider the ZIP file produced by gon (which will have the same file name) to be an artifact so we can use it downstream in publishing (e.g. to a homebrew tap)
|
- format: zip # This is a hack for syft-macos! We don't actually intend to use _this_ ZIP file, we just need goreleaser to consider the ZIP file produced by gon (which will have the same file name) to be an artifact so we can use it downstream in publishing (e.g. to a homebrew tap)
|
||||||
id: syft-zip
|
id: syft-exception
|
||||||
builds:
|
builds:
|
||||||
- syft-macos
|
- syft-macos
|
||||||
- syft-win
|
|
||||||
|
|
||||||
signs:
|
signs:
|
||||||
- artifacts: checksum
|
- artifacts: checksum
|
||||||
|
@ -109,8 +96,11 @@ brews:
|
||||||
- tap:
|
- tap:
|
||||||
owner: anchore
|
owner: anchore
|
||||||
name: homebrew-syft
|
name: homebrew-syft
|
||||||
|
ids:
|
||||||
|
- syft
|
||||||
homepage: *website
|
homepage: *website
|
||||||
description: *description
|
description: *description
|
||||||
|
license: "Apache License 2.0"
|
||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
- image_templates:
|
- image_templates:
|
||||||
|
|
Loading…
Reference in a new issue