gitpb/gitTag.common.go

16 lines
326 B
Go
Raw Normal View History

2025-01-05 03:22:04 -06:00
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 ""
}