-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use goreleaser to build binaries
- Loading branch information
1 parent
4c1db38
commit 4d17a53
Showing
9 changed files
with
140 additions
and
124 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
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
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 |
---|---|---|
|
@@ -25,3 +25,5 @@ | |
/internal/ui/ui/ | ||
**/Dockerfile.dapper* | ||
!**/Dockerfile.dapper | ||
|
||
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,74 @@ | ||
# This is an example .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
|
||
# The lines below are called `modelines`. See `:help modeline` | ||
# Feel free to remove those if you don't want/need to use them. | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||
|
||
version: 2 | ||
|
||
dist: bin | ||
|
||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
|
||
builds: | ||
- id: prod | ||
env: | ||
- CGO_ENABLED=0 | ||
targets: | ||
- "darwin_amd64" | ||
- "darwin_arm64" | ||
- "linux_amd64" | ||
- "linux_arm64" | ||
- "linux_arm" | ||
- "windows_amd64" | ||
flags: | ||
- -tags=embed | ||
binary: '{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}' | ||
ldflags: | | ||
{{ if ne .Os "darwin" }} | ||
-extldflags -static -s | ||
{{ else }} | ||
-s -w | ||
{{ end }} | ||
-X github.com/cnrancher/kube-explorer/internal/version.Version={{ .Env.VERSION }} | ||
-X github.com/cnrancher/kube-explorer/internal/version.GitCommit={{ .Env.COMMIT }} | ||
-X github.com/cnrancher/kube-explorer/internal/config.APIUIVersion={{ .Env.CATTLE_API_UI_VERSION }} | ||
no_unique_dist_dir: true | ||
- id: dev | ||
env: | ||
- CGO_ENABLED=0 | ||
targets: | ||
- "linux_amd64" | ||
flags: | ||
- -tags=embed | ||
binary: '{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}' | ||
ldflags: | | ||
{{ if ne .Os "darwin" }} | ||
-extldflags -static -s | ||
{{ else }} | ||
-s -w | ||
{{ end }} | ||
-X github.com/cnrancher/kube-explorer/internal/version.Version={{ .Env.VERSION }} | ||
-X github.com/cnrancher/kube-explorer/internal/version.GitCommit={{ .Env.COMMIT }} | ||
-X github.com/cnrancher/kube-explorer/internal/config.APIUIVersion={{ .Env.CATTLE_API_UI_VERSION }} | ||
no_unique_dist_dir: true | ||
upx: | ||
- compress: "5" | ||
ids: | ||
- prod | ||
enabled: true | ||
goos: | ||
- linux | ||
- windows | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" |
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
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
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 |
---|---|---|
|
@@ -6,4 +6,6 @@ cd $(dirname $0) | |
./download | ||
./validate | ||
./build | ||
./package | ||
if [ -z "${SKIP_PACKAGE}" ]; then | ||
./package | ||
fi |
This file was deleted.
Oops, something went wrong.
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