diff options
Diffstat (limited to 'currentVersions.go')
| -rw-r--r-- | currentVersions.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/currentVersions.go b/currentVersions.go index 9026149..beecc4f 100644 --- a/currentVersions.go +++ b/currentVersions.go @@ -211,6 +211,28 @@ func (repo *Repo) IsBranch(findname string) bool { return false } +// todo: redo this and above. both are messed up. ignore for now until things are stable +func (repo *Repo) IsLocalBranch(findname string) bool { + loop := repo.Tags.All() + for loop.Scan() { + t := loop.Next() + // log.Info("LocalTagExists() tag:", t.Refname) + + tagname := t.Refname + if strings.HasPrefix(tagname, "refs/heads") { + continue + } + path, filename := filepath.Split(tagname) + log.Log(GITPB, "gitpb.IsBranch() tag:", path, filename, "from", repo.GoPath) + if filename == findname { + log.Log(GITPB, "gitpb.IsBranch() found tag:", path, filename, "from", repo.GoPath) + return true + } + } + log.Log(GITPB, "did not find tag:", findname, "in", repo.GoPath) + return false +} + func trimNonNumericFromStart(s string) string { for i, r := range s { if unicode.IsDigit(r) { |
