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