Skip to content

Commit

Permalink
fix goreleaser config: use inert -v flag to avoid empty flags value
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengaudet committed Aug 2, 2023
1 parent a4974e8 commit 50e98dd
Showing 1 changed file with 9 additions and 31 deletions.
40 changes: 9 additions & 31 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ builds:
goarch:
- amd64
flags:
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- '{{ if .IsSnapshot }}-cover{{ else }}-v{{ end }}'

- id: signatory-cli-linux-amd
binary: signatory-cli
Expand All @@ -37,8 +36,7 @@ builds:
goarch:
- amd64
flags:
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- '{{ if .IsSnapshot }}-cover{{ else }}-v{{ end }}'

- id: signatory-linux-arm64
binary: signatory
Expand All @@ -57,8 +55,7 @@ builds:
goarch:
- arm64
flags:
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- '{{ if .IsSnapshot }}-cover{{ else }}-v{{ end }}'

- id: signatory-cli-linux-arm64
binary: signatory-cli
Expand All @@ -77,8 +74,7 @@ builds:
goarch:
- arm64
flags:
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- '{{ if .IsSnapshot }}-cover{{ else }}-v{{ end }}'

- id: signatory-linux-arm
binary: signatory
Expand All @@ -100,17 +96,14 @@ builds:
- '6'
- '7'
flags:
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- '{{ if .IsSnapshot }}-cover{{ else }}-v{{ end }}'

- id: signatory-cli-linux-arm
binary: signatory-cli
env:
- CGO_ENABLED=1
- CC=arm-linux-gnueabihf-gcc
- CXX=arm-linux-gnueabihf-g++
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory-cli/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -123,8 +116,7 @@ builds:
- '6'
- '7'
flags:
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- '{{ if .IsSnapshot }}-cover{{ else }}-v{{ end }}'

# MACOS
- id: signatory-darwin-amd
Expand All @@ -143,18 +135,13 @@ builds:
- darwin
goarch:
- amd64
flags:
- >-
{{- if .IsSnapshot }}-cover{{- end }}

- id: signatory-cli-darwing-amd
binary: signatory-cli
env:
- CGO_ENABLED=1
- CC=o64-clang
- CXX=o64-clang++
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory-cli/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -163,9 +150,6 @@ builds:
- darwin
goarch:
- amd64
flags:
- >-
{{- if .IsSnapshot }}-cover{{- end }}

- id: signatory-darwin-arm
binary: signatory
Expand All @@ -184,8 +168,7 @@ builds:
goarch:
- arm64
flags:
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- '{{ if .IsSnapshot }}-cover{{ else }}-v{{ end }}'

- id: signatory-cli-darwing-arm
binary: signatory-cli
Expand All @@ -204,8 +187,7 @@ builds:
goarch:
- arm64
flags:
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- '{{ if .IsSnapshot }}-cover{{ else }}-v{{ end }}'

# WINDOWS
- id: signatory-windows-amd
Expand All @@ -225,8 +207,7 @@ builds:
goarch:
- amd64
flags:
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- '{{ if .IsSnapshot }}-cover{{ else }}-v{{ end }}'

- id: signatory-cli-windows-amd
binary: signatory-cli
Expand All @@ -244,9 +225,6 @@ builds:
- windows
goarch:
- amd64
flags:
- >-
{{- if .IsSnapshot }}-cover{{- end }}

dockers:
- ids:
Expand Down

0 comments on commit 50e98dd

Please sign in to comment.