summaryrefslogtreecommitdiff
path: root/doRelease.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-12 14:52:13 -0500
committerJeff Carr <[email protected]>2025-09-12 14:52:13 -0500
commit63dc802ded383a6681ad08562ca1eeccfdebfa38 (patch)
tree2d9868afbfb830e84bb584cf2fa16b9892b578ce /doRelease.go
parentfd2254cd72ed2f74bd4133fd1db7fc0324f9f872 (diff)
add tag check to doRelease()
Diffstat (limited to 'doRelease.go')
-rw-r--r--doRelease.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/doRelease.go b/doRelease.go
index 047ac8e..7ce89ec 100644
--- a/doRelease.go
+++ b/doRelease.go
@@ -57,6 +57,16 @@ func doRelease() error {
check.Reload()
return fmt.Errorf("already released %s", check.GetGoPath())
}
+
+ // check if the git tag already exists somehow
+ testtag := me.release.version.String()
+ if check.LocalTagExists(testtag) {
+ log.Info("TAG ALREADY EXISTS", testtag)
+ return log.Errorf("%s TAG ALREADY EXISTS %s", check.FullPath, testtag)
+ } else {
+ log.Info("TAG IS NEW", testtag)
+ }
+
if me.forge.Config.IsPrivate(me.current.GetGoPath()) {
// do not self update private repos
log.Info("This is a private repo.")