recreate go.sum (happens after guireleaser is released)
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
1554249afd
commit
cd4bd5b914
12
doRelease.go
12
doRelease.go
|
@ -3,8 +3,10 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"go.wit.com/lib/gui/shell"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -90,7 +92,7 @@ func doRelease() bool {
|
||||||
|
|
||||||
// unwind and re-tag. Now that the go.mod and go.sum are published, revert
|
// unwind and re-tag. Now that the go.mod and go.sum are published, revert
|
||||||
// to the development branch
|
// to the development branch
|
||||||
if ! release.current.status.RevertMasterToDevel() {
|
if !release.current.status.RevertMasterToDevel() {
|
||||||
log.Info("Revert Failed")
|
log.Info("Revert Failed")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -118,7 +120,7 @@ func doRelease() bool {
|
||||||
release.current.vLabel.SetLabel(cbname + " " + cbversion)
|
release.current.vLabel.SetLabel(cbname + " " + cbversion)
|
||||||
|
|
||||||
// attempt to find another repo to release
|
// attempt to find another repo to release
|
||||||
if ! doReleaseFindNext() {
|
if !doReleaseFindNext() {
|
||||||
log.Info("doReleaseFindNext() could not find a new")
|
log.Info("doReleaseFindNext() could not find a new")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -165,6 +167,12 @@ func doPublishVersion() bool {
|
||||||
log.Info("CAN NOT SELF UPDATE HERE. cmd =", cmd)
|
log.Info("CAN NOT SELF UPDATE HERE. cmd =", cmd)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
homeDir, _ := os.UserHomeDir()
|
||||||
|
gosum := filepath.Join(homeDir, "go/src/go.wit.com/apps/guireleaser/go.sum")
|
||||||
|
if !shell.Exists(gosum) {
|
||||||
|
log.Info("go.sum must exist here")
|
||||||
|
release.guireleaser.status.MakeRedomod()
|
||||||
|
}
|
||||||
os.Unsetenv("GO111MODULE")
|
os.Unsetenv("GO111MODULE")
|
||||||
log.Info("TRYING TO SELF UPDATE HERE. cmd =", cmd)
|
log.Info("TRYING TO SELF UPDATE HERE. cmd =", cmd)
|
||||||
err, out := release.guireleaser.status.RunCmd(cmd)
|
err, out := release.guireleaser.status.RunCmd(cmd)
|
||||||
|
|
2
main.go
2
main.go
|
@ -54,7 +54,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gosum := filepath.Join(homeDir, "go/src/go.wit.com/apps/guireleaser/go.sum")
|
gosum := filepath.Join(homeDir, "go/src/go.wit.com/apps/guireleaser/go.sum")
|
||||||
if ! shell.Exists(gosum) {
|
if !shell.Exists(gosum) {
|
||||||
log.Info("go.sum must exist here")
|
log.Info("go.sum must exist here")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue