Skip to content

Commit

Permalink
version shows goreleaser build
Browse files Browse the repository at this point in the history
  • Loading branch information
pr8kerl committed Aug 10, 2019
1 parent 29b9897 commit 35f0d0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ builds:
goarch:
- amd64
binary: kubectl-ssm_secret
ldflags:
- -s -w -X github.com/pr8kerl/kubectl-ssm-secret/pkg/cmd.version={{.Version}}
archives:
- replacements:
darwin: darwin
Expand Down
4 changes: 3 additions & 1 deletion pkg/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import (
"github.com/spf13/cobra"
)

var version string = "snapshot"

var versionCmd = &cobra.Command{
Use: "version",
Short: "print the ssm-secret version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("ssm-secret v1.0.0")
fmt.Println(fmt.Sprintf("ssm-secret v%s", version))
},
}

0 comments on commit 35f0d0d

Please sign in to comment.