diff options
| author | Jeff Carr <[email protected]> | 2025-01-05 03:22:04 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-05 06:15:35 -0600 |
| commit | 6112d6e29899ec491150c0d346d66234badd8cdc (patch) | |
| tree | 86520bc10afea63b9d316cd48e52273cbd6d4077 | |
| parent | 010a2c6b58feaf89841c3ff4010ed37d679b370e (diff) | |
a simple get DevelHash()
| -rw-r--r-- | gitTag.common.go | 15 |
1 files changed, 15 insertions, 0 deletions
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 "" +} |
