From bab03875d20859e047f9ae2b3e406c64fd79fc64 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 5 Jan 2025 03:22:04 -0600 Subject: [PATCH] a simple get DevelHash() --- gitTag.common.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gitTag.common.go 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 "" +}