summaryrefslogtreecommitdiff
path: root/gitTag.common.go
blob: 64cef8ff5ee7599ae2d18226e61fc0641cf25818 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 ""
}