diff options
Diffstat (limited to 'gitTag.common.go')
| -rw-r--r-- | gitTag.common.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gitTag.common.go b/gitTag.common.go index 20fe31a..5292b01 100644 --- a/gitTag.common.go +++ b/gitTag.common.go @@ -156,6 +156,15 @@ func (repo *Repo) IsRemoteBranch(findname string) bool { return false } +func (repo *Repo) IfRefExists(refname string) bool { + for t := range repo.Tags.IterAll() { + if _, filename := filepath.Split(t.Refname); filename == refname { + return true + } + } + return false +} + // finds the newest tag. used for deciding if master needs to be published func (repo *Repo) FindLastTag() string { var newest *GitTag |
