From 4b7f42954bea3494eb7dd9a0f6a448cd6a2bd084 Mon Sep 17 00:00:00 2001 From: ssup2 Date: Tue, 23 Mar 2021 15:43:35 +0000 Subject: [PATCH] Update goreleaser to build kpexec as a kubectl plugin (kubectl-pexec) --- .goreleaser.yml | 64 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 82dd8a5..05f7b55 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -2,31 +2,61 @@ # Make sure to check the documentation at http://goreleaser.com before: hooks: - - go mod download + - go mod download builds: -- main: ./cmd/kpexec/main.go - env: - - CGO_ENABLED=0 - goos: - - linux - - darwin - - windows - goarch: - - amd64 - - arm64 - ldflags: - - -X github.com/ssup2/kpexec/pkg/cmd/kpexec.version={{ .Tag }} + - id: kpexec + main: ./cmd/kpexec/main.go + binary: kpexec + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm64 + ldflags: + - -X github.com/ssup2/kpexec/pkg/cmd/kpexec.version={{ .Tag }} + - id: kubectl-pexec + main: ./cmd/kpexec/main.go + binary: kubectl-pexec + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm64 + ldflags: + - -X github.com/ssup2/kpexec/pkg/cmd/kpexec.version={{ .Tag }} archives: -- replacements: - darwin: Darwin - linux: Linux - windows: Windows + - id: kpexec + builds: + - kpexec + name_template: "kpexec_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}" + replacements: + darwin: Darwin + linux: Linux + windows: Windows + - id: kubectl-pexec + builds: + - kubectl-pexec + name_template: "kubectl_pexec_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}" + replacements: + darwin: Darwin + linux: Linux + windows: Windows checksum: name_template: checksums.txt changelog: sort: asc brews: - name: kpexec + ids: + - kpexec tap: owner: ssup2 name: homebrew-tap