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()