summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-31 13:24:48 -0600
committerJeff Carr <[email protected]>2024-12-31 13:24:48 -0600
commit7f8cdac6fad06a548997f9bb1fbdc6507836efb0 (patch)
treec73c4379d043e5b0786ba2ce65b7261a2b2901a5
parent2c6dc806efb2443daa82948482b1b1e313936716 (diff)
stub in a show git refs() function
-rw-r--r--Makefile2
-rw-r--r--argv.go5
-rw-r--r--message.go12
3 files changed, 16 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4cc1786..f017f12 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
VERSION = $(shell git describe --tags)
GUIVERSION = $(shell git describe --tags)
-BUILDTIME = $(shell date +%s)
+BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
all: build
diff --git a/argv.go b/argv.go
index d6ffbaf..7e968e2 100644
--- a/argv.go
+++ b/argv.go
@@ -11,8 +11,9 @@ import (
var argv args
type args struct {
- Repo string `arg:"--repo" default:"/etc/gowebd/repomap" help:"what .git repo to use?"`
- Hostname string `arg:"--hostname" default:"go.wit.com" help:"hostname to use"`
+ Repo string `arg:"--repo" default:"./" help:"what .git repo to use?"`
+ Hostname string `arg:"--hostname" help:"hostname to use"`
+ Refs bool `arg:"--refs" help:"list the git ref hashes"`
}
func (args) Version() string {
diff --git a/message.go b/message.go
index 35a2e22..7c5954a 100644
--- a/message.go
+++ b/message.go
@@ -12,6 +12,18 @@ var VERSION string
var BUILDTIME string
func main() {
+ if argv.Refs {
+ showRefs()
+ } else {
+ testMessage()
+ }
+}
+
+func showRefs() {
+ log.Info("how do you do this with libgit2 and git2go? notsure.")
+}
+
+func testMessage() {
var input git.Trailer
input.Key = "Co-authored-by"