a simple get DevelHash()

This commit is contained in:
Jeff Carr 2025-01-05 03:22:04 -06:00
parent 010a2c6b58
commit 6112d6e298
1 changed files with 15 additions and 0 deletions

15
gitTag.common.go Normal file
View File

@ -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 ""
}