From 3083ddf8278ece9d59fc9b8571c3cea2c7003c41 Mon Sep 17 00:00:00 2001 From: Ian Stahnke <3182572+pr8kerl@users.noreply.github.com> Date: Wed, 6 Jul 2022 08:15:05 +1000 Subject: [PATCH] add license and latest goreleaser --- .goreleaser.yaml | 39 +++++++++++++++++++++++++++++++++++++++ LICENSE | 21 +++++++++++++++++++++ Makefile | 2 +- docker-compose.yml | 1 - pkg/cmd/version.go | 2 +- ssm-secret.yaml | 15 +++++++++++---- 6 files changed, 73 insertions(+), 7 deletions(-) create mode 100644 .goreleaser.yaml create mode 100644 LICENSE diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..41457d0 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,39 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 + targets: + - linux_amd64_v1 + - linux_arm64 + - darwin_amd64_v1 + - darwin_arm64 + - windows_amd64_v1 + ignore: + - goos: windows + goarch: arm64 + binary: kubectl-ssm_secret + main: ./cmd/kubectl-ssm_secret/main.go + # Custom ldflags templates. + # Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`. + ldflags: + - -s -w -X github.com/pr8kerl/kubectl-ssm-secret/pkg/cmd.version={{.Version}} +checksum: + name_template: 'checksums.txt' +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3929e7a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Ian Stahnke + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile index 987f68b..5e5baff 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ $(PROJ): deps build: deps @echo "--- goreleaser build :cooking:" - goreleaser build --single-target + goreleaser build --single-target --rm-dist release: deps @echo "--- package it up! :box:" diff --git a/docker-compose.yml b/docker-compose.yml index 9838f9e..ce60fbf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,6 @@ x-base: &base - GOARCH=${GOARCH:-amd64} - GOMODCACHE=/tmp/mod - GITHUB_TOKEN - - TRAVIS_TAG services: diff --git a/pkg/cmd/version.go b/pkg/cmd/version.go index c1c5054..6aff55d 100644 --- a/pkg/cmd/version.go +++ b/pkg/cmd/version.go @@ -12,6 +12,6 @@ var versionCmd = &cobra.Command{ Use: "version", Short: "print the ssm-secret version", Run: func(cmd *cobra.Command, args []string) { - fmt.Println(fmt.Printf("ssm-secret %s", version)) + fmt.Println(fmt.Sprintf("ssm-secret %s", version)) }, } diff --git a/ssm-secret.yaml b/ssm-secret.yaml index 8f57c02..8781735 100644 --- a/ssm-secret.yaml +++ b/ssm-secret.yaml @@ -17,28 +17,35 @@ spec: Parameter Store path. platforms: - uri: https://github.com/pr8kerl/kubectl-ssm-secret/releases/download/v1.3.1/kubectl-ssm-secret_1.3.1_darwin_x86_64.tar.gz - sha256: d19422a1d3300e1cbdb87ac7dfb5205f7452dcdfec33bfcc04677440e2cbd7a6 + sha256: 0341d536b25b8f4514e31b8ee8de596c1bd8540c7a32827a3dcb8937440278f0 bin: kubectl-ssm_secret selector: matchLabels: os: darwin arch: amd64 - uri: https://github.com/pr8kerl/kubectl-ssm-secret/releases/download/v1.3.1/kubectl-ssm-secret_1.3.1_darwin_arm64.tar.gz - sha256: d19422a1d3300e1cbdb87ac7dfb5205f7452dcdfec33bfcc04677440e2cbd7a6 + sha256: 9507340b5256d326999a2a047196162ae3f3d32cb73726f7525b6bf4bda97a68 bin: kubectl-ssm_secret selector: matchLabels: os: darwin arch: arm64 - uri: https://github.com/pr8kerl/kubectl-ssm-secret/releases/download/v1.3.1/kubectl-ssm-secret_1.3.1_linux_x86_64.tar.gz - sha256: 611e13356a4031d0ccf005f2a9eb6174709e8e1dfed17ab7da96913bb5c5a3bf + sha256: e75770405e750d1447d91dc3028c881964b3db0ae0c851b6de193bd68a218230 bin: kubectl-ssm_secret selector: matchLabels: os: linux arch: amd64 + - uri: https://github.com/pr8kerl/kubectl-ssm-secret/releases/download/v1.3.1/kubectl-ssm-secret_1.3.1_linux_arm64.tar.gz + sha256: a6d1eab77b54880bb69824fb18d9132f54863fff3651cec50808087a1eb95b1a + bin: kubectl-ssm_secret + selector: + matchLabels: + os: linux + arch: arm64 - uri: https://github.com/pr8kerl/kubectl-ssm-secret/releases/download/v1.3.1/kubectl-ssm-secret_1.3.1_windows_x86_64.tar.gz - sha256: 0c778b6f5fc6352be7c9e5cac7ec8a5231006ff8388d47ab61e82aa8a8f163b0 + sha256: eaef480cb348b9018d067ae073436f3b5ef54d13985d7968b24748a80733e036 bin: kubectl-ssm_secret.exe selector: matchLabels: