generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd38021
commit 8de3445
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
bin/ | ||
vendor/ | ||
.vscode/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# https://goreleaser.com/ | ||
# | ||
# For local testing, use: | ||
# | ||
# goreleaser release --snapshot --clean | ||
project_name: gwctl | ||
|
||
before: | ||
hooks: | ||
# Ensure the project builds successfully before release. | ||
- make build | ||
|
||
# Refer https://goreleaser.com/customization/builds/ for all available options. | ||
builds: | ||
- id: gwctl # Build ID for reference. | ||
main: ./main.go | ||
binary: gwctl # Binary name. | ||
env: | ||
- CGO_ENABLED=0 # Disable CGO for broader compatibility. | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- 386 | ||
- amd64 | ||
- arm64 | ||
ldflags: | ||
# Reduce the size of the binary. Ref: https://pkg.go.dev/cmd/link | ||
- -s -w | ||
# Embed versioning and build information in the binary. | ||
- -X sigs.k8s.io/gwctl/pkg/version.version={{.Version}} | ||
- -X sigs.k8s.io/gwctl/pkg/version.gitCommit={{.FullCommit}} | ||
- -X sigs.k8s.io/gwctl/pkg/version.buildDate={{.Date}} | ||
|
||
archives: | ||
- format: tar.gz | ||
# This name template makes the OS and Arch compatible with the results of | ||
# uname. | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end }} | ||
# Use zip for windows archives | ||
format_overrides: | ||
- goos: windows | ||
format: zip |