this maybe will redo the tag correctly
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
3e9a55b2ac
commit
4d38d78b0d
|
@ -0,0 +1,40 @@
|
|||
// This is a simple example
|
||||
package main
|
||||
|
||||
import (
|
||||
"go.wit.com/log"
|
||||
)
|
||||
|
||||
func (r *repo) lookToUnwind() bool {
|
||||
goSumS := r.getGoSumStatus()
|
||||
dirtyS := r.dirtyLabel.String()
|
||||
currentS := r.status.GetCurrentBranchVersion()
|
||||
log.Info("repo:", r.String(), goSumS, dirtyS, r.lastTag.String(), currentS)
|
||||
|
||||
|
||||
curName := r.status.GetCurrentBranchName()
|
||||
mName := r.status.GetMasterBranchName()
|
||||
|
||||
if curName == mName {
|
||||
log.Info("\trepo is ready working from main branch", curName, "=", mName)
|
||||
} else {
|
||||
log.Info("\trepo is not ready main branch", curName, "!=", mName)
|
||||
r.setGoSumStatus("CAN NOT UNWIND")
|
||||
return false
|
||||
}
|
||||
|
||||
if r.lastTag.String() != currentS {
|
||||
log.Info("\trepo version mismatch last vs current", r.lastTag.String(), "!=", currentS)
|
||||
r.setGoSumStatus("CAN NOT UNWIND")
|
||||
return false
|
||||
}
|
||||
|
||||
if "v" + release.versionS != r.lastTag.String() {
|
||||
log.Info("\trepo version mismatch last vs official", r.lastTag.String(), "!=", release.versionS)
|
||||
r.setGoSumStatus("CAN NOT UNWIND")
|
||||
return false
|
||||
}
|
||||
|
||||
r.setGoSumStatus("UNWIND")
|
||||
return true
|
||||
}
|
|
@ -9,9 +9,22 @@ import (
|
|||
func createUnreleaseBox(box *gui.Node) {
|
||||
group := release.box.NewGroup("undo and redo things")
|
||||
|
||||
group.NewButton("punk the zip", func() {
|
||||
group.NewButton("find the unreleased", func() {
|
||||
me.Disable()
|
||||
defer me.Enable()
|
||||
for _, repo := range me.allrepos {
|
||||
if whitelist(repo.String()) {
|
||||
log.Info("skipping whitelist", repo.String())
|
||||
continue
|
||||
}
|
||||
|
||||
if repo.lookToUnwind() {
|
||||
log.Info("found something to unwind:", repo.String())
|
||||
if setCurrentRepo(repo, "rewind this", "very sure") {
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
group.NewButton("re-release"+release.versionS, func() {
|
||||
me.Disable()
|
||||
|
@ -32,7 +45,21 @@ func createUnreleaseBox(box *gui.Node) {
|
|||
log.Info("\treset to devel", curName, release.versionS, release.reasonS)
|
||||
|
||||
release.current.status.RunCmd([]string{"git", "checkout", "devel"})
|
||||
release.current.status.RunCmd([]string{"git", "branch", "-d", mName})
|
||||
release.current.status.RunCmd([]string{"git", "branch", "-D", mName})
|
||||
release.current.status.RunCmd([]string{"git", "branch", mName})
|
||||
release.current.status.RunCmd([]string{"git", "checkout", mName})
|
||||
release.current.status.RunCmd([]string{"git", "push", "--set-upstream", "--force", "origin", mName})
|
||||
|
||||
release.current.status.RunCmd([]string{"git", "tag", "--delete", "v" + release.versionS})
|
||||
release.current.status.RunCmd([]string{"git", "push", "--delete", "origin", "v" + release.versionS})
|
||||
release.current.status.RunCmd([]string{"git", "tag", "-m", release.reasonS, "v" + release.versionS})
|
||||
release.current.status.RunCmd([]string{"git", "push", "origin", "v" + release.versionS})
|
||||
// git tag --delete v0.3
|
||||
// git push --delete origin v0.3
|
||||
|
||||
// git push --set-upstream --force origin guimaster
|
||||
|
||||
// release.current.status.RunCmd([]string{"git", "branch", "--unset-upstream", mName})
|
||||
/*
|
||||
release.current.status.RunCmd([]string{"git", "add", "-f", "go.sum"})
|
||||
release.current.status.RunCmd([]string{"git", "commit", "-m", release.reasonS})
|
||||
|
|
Loading…
Reference in New Issue