From c9639a8db225874dfe1f0085aaba1494c4cedc78 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 18 Dec 2024 20:24:28 -0600 Subject: [PATCH] try to use the last tag versions --- prepareRelease.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/prepareRelease.go b/prepareRelease.go index 796a4ca..e145a13 100644 --- a/prepareRelease.go +++ b/prepareRelease.go @@ -1,8 +1,6 @@ package main import ( - "os" - "go.wit.com/lib/protobuf/forgepb" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" @@ -45,7 +43,7 @@ func forceReleaseVersion(repo *gitpb.Repo) { if !runGoClean(repo, "--restore") { log.Info("go-mod-clean probably failed here. that's ok", repo.GetGoPath()) - os.Exit(-1) + // os.Exit(-1) } } @@ -62,6 +60,19 @@ func rePrepareRelease() { // set the target version to the current master version lastTag := check.GetLastTag() check.SetTargetVersion(lastTag) + if me.forge.Config.IsReadOnly(check.GetGoPath()) { + // can't release readonly repos + continue + } + if me.forge.Config.IsPrivate(check.GetGoPath()) { + // can't release readonly repos + continue + } + + if !runGoClean(check, "--restore") { + log.Info("go-mod-clean probably failed here. that's ok", check.GetGoPath()) + // os.Exit(-1) + } } all = me.forge.Repos.SortByFullPath()