summaryrefslogtreecommitdiff
path: root/gitTag.common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-05 13:05:49 -0500
committerJeff Carr <[email protected]>2025-10-05 13:05:49 -0500
commit6f43c6b2f8e8ef4b19efa43f35f8be8ed7f77fd0 (patch)
treedb3285e03c297f989fa0eb01d6a8ff8e75f74e38 /gitTag.common.go
parentb48241106bfadeaae12a8558d8913747881edf4f (diff)
this stuff finally is fixed (maybe)
Diffstat (limited to 'gitTag.common.go')
-rw-r--r--gitTag.common.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/gitTag.common.go b/gitTag.common.go
index df78273..20fe31a 100644
--- a/gitTag.common.go
+++ b/gitTag.common.go
@@ -140,6 +140,22 @@ func (repo *Repo) IsLocalBranch(findname string) bool {
return false
}
+func (repo *Repo) IsRemoteBranch(findname string) bool {
+ for t := range repo.Tags.IterAll() {
+ if !strings.HasPrefix(t.Refname, "refs/remotes/origin") {
+ continue
+ }
+ path, filename := filepath.Split(t.Refname)
+ log.Log(INFO, "gitpb.IsBranch() tag:", path, filename, "from", repo.GetGoPath())
+ if filename == findname {
+ log.Log(INFO, "gitpb.IsBranch() found tag:", path, filename, "from", repo.GetGoPath())
+ return true
+ }
+ }
+ log.Log(INFO, "did not find tag:", findname, "in", repo.GetGoPath())
+ return false
+}
+
// finds the newest tag. used for deciding if master needs to be published
func (repo *Repo) FindLastTag() string {
var newest *GitTag