summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.goreleaser.yaml3
-rw-r--r--cmd/goaes/main.go9
2 files changed, 10 insertions, 2 deletions
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 742b6be..6fb2d67 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -25,6 +25,9 @@ builds:
goarch:
- amd64
- arm64
+ ldflags:
+ - -s -w
+ - -X main.version={{.Version}}
archives:
- formats: [tar.gz]
diff --git a/cmd/goaes/main.go b/cmd/goaes/main.go
index 913317d..df89eed 100644
--- a/cmd/goaes/main.go
+++ b/cmd/goaes/main.go
@@ -9,10 +9,15 @@ import (
"github.com/urfave/cli/v3"
)
+var (
+ version = "dev"
+)
+
func main() {
cmd := &cli.Command{
- Name: "goaes",
- Usage: "Simple AES encryption built with Go",
+ Name: "goaes",
+ Usage: "Simple AES encryption built with Go",
+ Version: version,
Action: func(ctx context.Context, cmd *cli.Command) error {
return cli.DefaultShowRootCommandHelp(cmd)
},