2024-01-31 05:04:18 -06:00
|
|
|
// This is a simple example
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"go.wit.com/gui"
|
|
|
|
"go.wit.com/log"
|
|
|
|
)
|
|
|
|
|
|
|
|
func createUnreleaseBox(box *gui.Node) {
|
|
|
|
group := release.box.NewGroup("undo and redo things")
|
|
|
|
|
2024-01-31 06:05:11 -06:00
|
|
|
group.NewButton("find the unreleased", func() {
|
2024-01-31 05:04:18 -06:00
|
|
|
me.Disable()
|
|
|
|
defer me.Enable()
|
2024-01-31 06:05:11 -06:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
2024-01-31 05:04:18 -06:00
|
|
|
})
|
|
|
|
group.NewButton("re-release"+release.versionS, func() {
|
|
|
|
me.Disable()
|
|
|
|
defer me.Enable()
|
|
|
|
|
|
|
|
if release.current.status.CheckDirty() {
|
|
|
|
log.Info("sorry, it's still dirty")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
curName := release.current.status.GetCurrentBranchName()
|
|
|
|
mName := release.current.status.GetMasterBranchName()
|
|
|
|
if curName != mName {
|
|
|
|
log.Info("\trepo is not working from main branch", curName, "!=", mName)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
log.Info("\treset to devel", curName, release.versionS, release.reasonS)
|
|
|
|
|
|
|
|
release.current.status.RunCmd([]string{"git", "checkout", "devel"})
|
2024-01-31 06:05:11 -06:00
|
|
|
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})
|
2024-01-31 05:04:18 -06:00
|
|
|
/*
|
|
|
|
release.current.status.RunCmd([]string{"git", "add", "-f", "go.sum"})
|
|
|
|
release.current.status.RunCmd([]string{"git", "commit", "-m", release.reasonS})
|
|
|
|
release.current.status.RunCmd([]string{"git", "push"})
|
|
|
|
release.current.status.RunCmd([]string{"git", "tag", "-m", release.reasonS, "v" + release.versionS})
|
|
|
|
release.current.status.RunCmd([]string{"git", "push", "origin", "v" + release.versionS})
|
|
|
|
*/
|
|
|
|
})
|
|
|
|
}
|