--- a/convey.yml Tue Jun 21 16:49:17 2022 -0500
+++ b/convey.yml Tue Jun 21 16:51:05 2022 -0500
@@ -1,5 +1,5 @@
@@ -41,7 +41,7 @@
- OUTPUT=hgkeeper-${VERSION}-${GOOS}-${GOARCH}
- - go build -o ${OUTPUT}
+ - go build -o ${OUTPUT} -ldflags "-X keep.imfreedom.org/grim/hgkeeper/version.Commit=${COMMIT_SHORT}" - sha256sum ${OUTPUT} | tee ${OUTPUT}.sha256sum
@@ -53,7 +53,7 @@
- OUTPUT=hgkeeper-${VERSION}-${GOOS}-${GOARCH}
- - go build -o ${OUTPUT}
+ - go build -o ${OUTPUT} -ldflags "-X keep.imfreedom.org/grim/hgkeeper/version.Commit=${COMMIT_SHORT}" - sha256sum ${OUTPUT} | tee ${OUTPUT}.sha256sum
@@ -65,7 +65,7 @@
- OUTPUT=hgkeeper-${VERSION}-${GOOS}-${GOARCH}
- - go build -o ${OUTPUT}
+ - go build -o ${OUTPUT} -ldflags "-X keep.imfreedom.org/grim/hgkeeper/version.Commit=${COMMIT_SHORT}" - sha256sum ${OUTPUT} | tee ${OUTPUT}.sha256sum
@@ -77,7 +77,8 @@
- OUTPUT=hgkeeper-${VERSION}-${GOOS}-${GOARCH}.exe
- - go build -o ${OUTPUT}
+ - go build -o ${OUTPUT} -ldflags "-X keep.imfreedom.org/grim/hgkeeper/version.Commit=${COMMIT_SHORT}" + - sha256sum ${OUTPUT} | tee ${OUTPUT}.sha256sum - sha256sum ${OUTPUT} | tee ${OUTPUT}.sha256sum
--- a/main.go Tue Jun 21 16:49:17 2022 -0500
+++ b/main.go Tue Jun 21 16:51:05 2022 -0500
@@ -11,6 +11,7 @@
"keep.imfreedom.org/grim/hgkeeper/once"
"keep.imfreedom.org/grim/hgkeeper/serve"
"keep.imfreedom.org/grim/hgkeeper/setup"
+ "keep.imfreedom.org/grim/hgkeeper/version" @@ -20,6 +21,7 @@
Once once.Command `kong:"cmd,help='run hgkeeper for one transaction. This is used when integrating with a system ssh server'"`
Serve serve.Command `kong:"cmd,help='run the ssh server'"`
Setup setup.Command `kong:"cmd,help='inital setup for the server'"`
+ Version version.Command `kong:"cmd,help='display the version and exit'"`