summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-03 11:26:56 -0500
committerJeff Carr <[email protected]>2025-10-03 11:26:56 -0500
commit308b7a0a9ebe0a08487aa944e9550a457071354f (patch)
tree4ecd14b24c0b4b9785fc2efe24e8d037271613b0
parentcb7dd8534c791075a2dba0dbb7651280c530a9de (diff)
new --version
-rw-r--r--Makefile2
-rw-r--r--argv.go8
-rw-r--r--main.go2
3 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 24368a6..43474bc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
VERSION = $(shell git describe --tags)
-BUILDTIME = $(shell date +%Y.%m.%d)
+BUILDTIME = $(shell date +%s)
all: install
diff --git a/argv.go b/argv.go
index e3e0421..cb952ce 100644
--- a/argv.go
+++ b/argv.go
@@ -60,11 +60,15 @@ func (args) Appname() string {
return ARGNAME
}
+func (args) Buildtime() (string, string) {
+ return BUILDTIME, VERSION
+}
+
func (a args) DoAutoComplete(pb *prep.Auto) {
if pb.Cmd == "" {
- pb.Autocomplete3([]string{"--bash", "quick", "--dry-run", "--full", "--reason"})
+ pb.Autocomplete3([]string{"--bash", "quick", "--dry-run", "--full", "--reason", "--version"})
} else {
- pb.SubCommand(pb.Argv...)
+ pb.SubCommand(pb.Goargs...)
}
os.Exit(0)
}
diff --git a/main.go b/main.go
index 31f7e92..49b02cb 100644
--- a/main.go
+++ b/main.go
@@ -17,6 +17,8 @@ import (
)
var VERSION string
+var BUILDTIME string
+
var ARGNAME string = "guireleaser"
//go:embed resources/*