summaryrefslogtreecommitdiff
path: root/doRelease.go
diff options
context:
space:
mode:
Diffstat (limited to 'doRelease.go')
-rw-r--r--doRelease.go17
1 files changed, 15 insertions, 2 deletions
diff --git a/doRelease.go b/doRelease.go
index 98fbc28..3f4c215 100644
--- a/doRelease.go
+++ b/doRelease.go
@@ -5,6 +5,7 @@ import (
"os"
"path/filepath"
"strings"
+ "time"
"github.com/go-cmd/cmd"
@@ -14,6 +15,10 @@ import (
func doRelease() bool {
log.Info("doRelease() on", me.current.Name())
+ if !findOk {
+ log.Info("doRelease() immediately end something went wrong last time. findOk == false")
+ return false
+ }
// double check release version logic
if me.release.releaseVersionB.String() != "release version "+me.release.version.String() {
log.Warn("something went wrong with the release.version:", me.release.version.String())
@@ -90,14 +95,20 @@ func doRelease() bool {
if !me.current.Status.DoAll(all) {
log.Info("failed to make new release", me.release.version.String())
+ findOk = false
return false
}
log.Info("RELEASE OK")
// 'publish' the version to the golang package versioning system
if !doPublishVersion() {
- log.Info("PUBLISH FAILED")
- return false
+ time.Sleep(3 * time.Second)
+ // this can fail to update, try it again after sleep(3s)
+ if !doPublishVersion() {
+ log.Info("PUBLISH FAILED")
+ findOk = false
+ return false
+ }
}
pb := me.forge.Repos.FindByGoPath(me.current.GoPath())
@@ -122,6 +133,7 @@ func doRelease() bool {
// to the development branch
if !me.current.Status.RevertMasterToDevel() {
log.Info("Revert Failed")
+ findOk = false
return false
}
@@ -134,6 +146,7 @@ func doRelease() bool {
if !me.current.Status.DoAll(retag) {
log.Info("retag failed")
+ findOk = false
return false
}
log.Info("EVERYTHING OK. RERELEASED", me.current.Name())