From 63dc802ded383a6681ad08562ca1eeccfdebfa38 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 12 Sep 2025 14:52:13 -0500 Subject: add tag check to doRelease() --- doRelease.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doRelease.go') 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.") -- cgit v1.2.3