Skip to content

Commit

Permalink
use goreleaser conditionals properly
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengaudet committed Aug 1, 2023
1 parent a7de510 commit a4974e8
Showing 1 changed file with 48 additions and 24 deletions.
72 changes: 48 additions & 24 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ builds:
- CGO_ENABLED=1
- CC=gcc
- CXX=g++
- '{{ if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{ end }}'
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -16,15 +17,17 @@ builds:
goarch:
- amd64
flags:
- '{{ if .IsSnapshot }}-cover{{ end }}'
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- id: signatory-cli-linux-amd
binary: signatory-cli
env:
- CGO_ENABLED=1
- CC=gcc
- CXX=g++
- '{{ if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{ end }}'
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory-cli/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -34,15 +37,17 @@ builds:
goarch:
- amd64
flags:
- '{{ if .IsSnapshot }}-cover{{ end }}'
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- id: signatory-linux-arm64
binary: signatory
env:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
- '{{ if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{ end }}'
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -52,15 +57,17 @@ builds:
goarch:
- arm64
flags:
- '{{ if .IsSnapshot }}-cover{{ end }}'
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- id: signatory-cli-linux-arm64
binary: signatory-cli
env:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
- '{{ if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{ end }}'
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory-cli/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -70,15 +77,17 @@ builds:
goarch:
- arm64
flags:
- '{{ if .IsSnapshot }}-cover{{ end }}'
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- id: signatory-linux-arm
binary: signatory
env:
- CGO_ENABLED=1
- CC=arm-linux-gnueabihf-gcc
- CXX=arm-linux-gnueabihf-g++
- '{{ if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{ end }}'
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -91,15 +100,17 @@ builds:
- '6'
- '7'
flags:
- '{{ if .IsSnapshot }}-cover{{ end }}'
- >-
{{- if .IsSnapshot }}-cover{{- 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 }}'
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory-cli/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -112,7 +123,8 @@ builds:
- '6'
- '7'
flags:
- '{{ if .IsSnapshot }}-cover{{ end }}'
- >-
{{- if .IsSnapshot }}-cover{{- end }}
# MACOS
- id: signatory-darwin-amd
Expand All @@ -121,7 +133,8 @@ builds:
- CGO_ENABLED=1
- CC=o64-clang
- CXX=o64-clang++
- '{{ if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{ end }}'
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -131,15 +144,17 @@ builds:
goarch:
- amd64
flags:
- '{{ if .IsSnapshot }}-cover{{ end }}'
- >-
{{- 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 }}'
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory-cli/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -149,15 +164,17 @@ builds:
goarch:
- amd64
flags:
- '{{ if .IsSnapshot }}-cover{{ end }}'
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- id: signatory-darwin-arm
binary: signatory
env:
- CGO_ENABLED=1
- CC=oa64-clang
- CXX=oa64-clang++
- '{{ if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{ end }}'
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -167,15 +184,17 @@ builds:
goarch:
- arm64
flags:
- '{{ if .IsSnapshot }}-cover{{ end }}'
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- id: signatory-cli-darwing-arm
binary: signatory-cli
env:
- CGO_ENABLED=1
- CC=oa64-clang
- CXX=oa64-clang++
- '{{ if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{ end }}'
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory-cli/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -185,7 +204,8 @@ builds:
goarch:
- arm64
flags:
- '{{ if .IsSnapshot }}-cover{{ end }}'
- >-
{{- if .IsSnapshot }}-cover{{- end }}
# WINDOWS
- id: signatory-windows-amd
Expand All @@ -194,7 +214,8 @@ builds:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
- '{{ if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{ end }}'
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -204,15 +225,17 @@ builds:
goarch:
- amd64
flags:
- '{{ if .IsSnapshot }}-cover{{ end }}'
- >-
{{- if .IsSnapshot }}-cover{{- end }}
- id: signatory-cli-windows-amd
binary: signatory-cli
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
- '{{ if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{ end }}'
- >-
{{- if .IsSnapshot }}GOEXPERIMENT=coverageredesign{{- end }}
main: ./cmd/signatory-cli/main.go
ldflags:
- '-X github.com/ecadlabs/signatory/pkg/metrics.GitRevision={{.Version}}'
Expand All @@ -222,7 +245,8 @@ builds:
goarch:
- amd64
flags:
- '{{ if .IsSnapshot }}-cover{{ end }}'
- >-
{{- if .IsSnapshot }}-cover{{- end }}
dockers:
- ids:
Expand Down

0 comments on commit a4974e8

Please sign in to comment.