mirror of
https://github.com/cnrancher/kube-explorer.git
synced 2025-04-27 11:00:48 +00:00
76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
# 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"
|
|
- "linux_arm64"
|
|
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:"
|