aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs/git.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/vcs/git.go')
-rw-r--r--pkg/vcs/git.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/vcs/git.go b/pkg/vcs/git.go
index 5a6de4b3f..a42f12edc 100644
--- a/pkg/vcs/git.go
+++ b/pkg/vcs/git.go
@@ -476,3 +476,15 @@ func (git *git) previousReleaseTags(commit string, self bool) ([]string, error)
tags = append(tags, tags1...)
return tags, nil
}
+
+func (git *git) IsRelease(commit string) (bool, error) {
+ tags1, err := git.previousReleaseTags(commit, true)
+ if err != nil {
+ return false, err
+ }
+ tags2, err := git.previousReleaseTags(commit, false)
+ if err != nil {
+ return false, err
+ }
+ return len(tags1) != len(tags2), nil
+}