From 800690a8a8a72e4d2ebf200f264d3ebaf66cf8d4 Mon Sep 17 00:00:00 2001 From: Rick <1450685+LinuxSuRen@users.noreply.github.com> Date: Mon, 30 Aug 2021 13:30:17 +0800 Subject: [PATCH] Add kubectl plugin binary files (#183) --- .goreleaser.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index d2cb0af..012beee 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -20,10 +20,30 @@ builds: - -X github.com/linuxsuren/cobra-extension/version.commit={{.ShortCommit}} - -X github.com/linuxsuren/cobra-extension/version.date={{.Date}} - -w +- env: + - CGO_ENABLED=0 + id: "kubectl-ks" + binary: kubectl-ks + main: ./kubectl-plugin/kubectl-ks.go + goarch: + - amd64 + goos: + - linux + - darwin + hooks: + post: + - upx "{{ .Path }}" + ldflags: + - -X github.com/linuxsuren/cobra-extension/version.version={{.Version}} + - -X github.com/linuxsuren/cobra-extension/version.commit={{.ShortCommit}} + - -X github.com/linuxsuren/cobra-extension/version.date={{.Date}} + - -w dist: bin archives: - name_template: "ks-{{ .Os }}-{{ .Arch }}" id: "ks" + builds: + - ks replacements: darwin: darwin linux: linux @@ -36,6 +56,17 @@ archives: files: - README.md - LICENSE + - name_template: "kubectl-ks-{{ .Os }}-{{ .Arch }}" + id: "kubectl-ks" + builds: + - "kubectl-ks" + replacements: + darwin: darwin + linux: linux + amd64: amd64 + files: + - README.md + - LICENSE checksum: name_template: 'checksums.txt' snapshot: