summaryrefslogtreecommitdiff
path: root/gitTag.common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-05 03:22:04 -0600
committerJeff Carr <[email protected]>2025-01-05 06:15:35 -0600
commit6112d6e29899ec491150c0d346d66234badd8cdc (patch)
tree86520bc10afea63b9d316cd48e52273cbd6d4077 /gitTag.common.go
parent010a2c6b58feaf89841c3ff4010ed37d679b370e (diff)
a simple get DevelHash()
Diffstat (limited to 'gitTag.common.go')
-rw-r--r--gitTag.common.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/gitTag.common.go b/gitTag.common.go
new file mode 100644
index 0000000..64cef8f
--- /dev/null
+++ b/gitTag.common.go
@@ -0,0 +1,15 @@
+package gitpb
+
+func (repo *Repo) DevelHash() string {
+ brname := repo.GetDevelBranchName()
+ refname := "refs/heads/" + brname
+ all := repo.Tags.All()
+ for all.Scan() {
+ tag := all.Next()
+ // log.Info("repo tag", tag.GetHash(), tag.GetRefname())
+ if tag.GetRefname() == refname {
+ return tag.GetHash()
+ }
+ }
+ return ""
+}