summaryrefslogtreecommitdiff
path: root/setTargetVersion.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-23 11:31:07 -0600
committerJeff Carr <[email protected]>2024-02-23 11:31:07 -0600
commit6ad559dbbc63d02349e2e2fafeaaf4ecfb844b7a (patch)
treeb75b8a0969d8e7014418184b08a2a328fe5e68f5 /setTargetVersion.go
parent1f5b5d4688dd92a864ad266d63bb32a02e6045ac (diff)
skip publish for private reposv0.20.9
Diffstat (limited to 'setTargetVersion.go')
-rw-r--r--setTargetVersion.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/setTargetVersion.go b/setTargetVersion.go
index cf1090c..53d0abc 100644
--- a/setTargetVersion.go
+++ b/setTargetVersion.go
@@ -30,7 +30,13 @@ func setTargetVersion() {
if repo.GoPath() == "go.wit.com/widget" {
repo.Status.SetTargetVersion("v" + widgetVersion)
} else {
- repo.Status.SetTargetVersion("v" + releaseVersion)
+ prefix := "v" + releaseVersion
+ lasttag := repo.Status.LastTag()
+ if strings.HasPrefix(lasttag, prefix) {
+ repo.Status.SetTargetVersion(lasttag)
+ } else {
+ repo.Status.SetTargetVersion(prefix)
+ }
}
if strings.HasPrefix(repo.GoPath(), "go.wit.com/dev/") {
lasttag := repo.Status.GetLastTagVersion()