say goodbye finally
This commit is contained in:
parent
209c270add
commit
7ccbf7f59d
|
@ -1,12 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"go.wit.com/lib/gui/repolist"
|
||||
)
|
||||
|
||||
// like tcl/tk, use ENV variables to set display preferences
|
||||
/*
|
||||
func hideFunction(r *repolist.RepoRow) {
|
||||
// always show dirty repos
|
||||
if r.Status.IsDirty() {
|
||||
|
@ -40,3 +35,4 @@ func hideFunction(r *repolist.RepoRow) {
|
|||
// as read-only=true
|
||||
r.Show()
|
||||
}
|
||||
*/
|
||||
|
|
53
http.go
53
http.go
|
@ -77,7 +77,6 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
|||
case "/rescanAll":
|
||||
me.repos.View.ScanRepositories()
|
||||
case "/setCurrentRepo":
|
||||
|
||||
log.Info("repo: " + repoName)
|
||||
log.Info("version: " + version)
|
||||
log.Info("comment: " + comment)
|
||||
|
@ -89,59 +88,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
setCurrentRepo(repo, "HTTP", "doRelease() ?")
|
||||
case "/IncrementRevisonVersion":
|
||||
log.Info("repo: " + repoName)
|
||||
log.Info("version: " + version)
|
||||
me.current.IncrementTargetRevision()
|
||||
case "/IncrementMinorVersion":
|
||||
log.Info("repo: " + repoName)
|
||||
log.Info("version: " + version)
|
||||
|
||||
me.current.IncrementTargetMinor()
|
||||
case "/setAllBranchesToMaster":
|
||||
log.Info("set all branches to master")
|
||||
me.Disable()
|
||||
defer me.Enable()
|
||||
if setAllBranchesToMaster() {
|
||||
// if it succeeds, disable this button
|
||||
me.setBranchesToMasterB.Disable()
|
||||
}
|
||||
return
|
||||
case "/setTargetVersion":
|
||||
log.Info("repo: " + repoName)
|
||||
log.Info("version: " + version)
|
||||
if repoName != "" {
|
||||
repo := me.repos.View.FindByName(repoName)
|
||||
if repo == nil {
|
||||
log.Info("could not find repo", repoName)
|
||||
} else {
|
||||
log.Info("setting target version", version)
|
||||
repo.Status.SetTargetVersion(version)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if me.current == nil {
|
||||
log.Info("me.current == nil")
|
||||
return
|
||||
}
|
||||
me.current.SetTargetVersion(version)
|
||||
return
|
||||
case "/setAllTargetVersions":
|
||||
log.Info("version: " + version)
|
||||
|
||||
loop := me.repos.View.ReposSortByName()
|
||||
for loop.Scan() {
|
||||
repo := loop.Repo()
|
||||
|
||||
master := repo.Status.GetMasterVersion()
|
||||
lastTag := repo.Status.LastTag()
|
||||
if master == lastTag {
|
||||
repo.Status.SetTargetVersion(master)
|
||||
} else {
|
||||
repo.Status.IncrementRevisionVersion("Nov 2024 test")
|
||||
}
|
||||
}
|
||||
case "/whitelist":
|
||||
repo := me.repos.View.FindByName(repoName)
|
||||
if repo == nil {
|
||||
|
|
10
main.go
10
main.go
|
@ -29,6 +29,7 @@ func main() {
|
|||
me.forge = forgepb.Init()
|
||||
me.found = new(gitpb.Repos)
|
||||
|
||||
/*
|
||||
var bad bool = false
|
||||
all := me.forge.Repos.SortByFullPath()
|
||||
for all.Scan() {
|
||||
|
@ -44,6 +45,7 @@ func main() {
|
|||
if bad {
|
||||
os.Exit(-1)
|
||||
}
|
||||
*/
|
||||
|
||||
// me.forge.ConfigPrintTable()
|
||||
os.Setenv("REPO_WORK_PATH", me.forge.GetGoSrc())
|
||||
|
@ -109,7 +111,7 @@ func main() {
|
|||
me.Disable()
|
||||
|
||||
// register a Show/Hide function for the repo list table
|
||||
me.repos.View.RegisterHideFunction(hideFunction)
|
||||
// me.repos.View.RegisterHideFunction(hideFunction)
|
||||
|
||||
// scan in the State of all the repos
|
||||
// TODO: should not really be necessary directly after init()
|
||||
|
@ -124,9 +126,9 @@ func main() {
|
|||
repo.Status.SetReadOnly(false)
|
||||
}
|
||||
if me.forge.Config.IsPrivate(repo.GetGoPath()) {
|
||||
repo.Status.SetPrivate(true)
|
||||
// repo.Status.SetPrivate(true)
|
||||
} else {
|
||||
repo.Status.SetPrivate(false)
|
||||
// repo.Status.SetPrivate(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,6 +153,7 @@ func main() {
|
|||
})
|
||||
}
|
||||
|
||||
/*
|
||||
// start the initail scan and make sure each repo is set
|
||||
// to the master branch
|
||||
func setAllBranchesToMaster() bool {
|
||||
|
@ -177,3 +180,4 @@ func setAllBranchesToMaster() bool {
|
|||
}
|
||||
return worked
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -14,6 +14,7 @@ func makePrepareRelease() {
|
|||
me.release.box.Disable()
|
||||
defer me.Enable()
|
||||
|
||||
/*
|
||||
if setAllBranchesToMaster() {
|
||||
// if it succeeds, disable this button
|
||||
me.setBranchesToMasterB.Disable()
|
||||
|
@ -22,6 +23,7 @@ func makePrepareRelease() {
|
|||
} else {
|
||||
log.Info("setAllBranchesToMaster() failed")
|
||||
}
|
||||
*/
|
||||
|
||||
// run this each time something gets published successfully
|
||||
rePrepareRelease()
|
||||
|
|
|
@ -188,10 +188,12 @@ func createReleaseBox(box *gui.Node) {
|
|||
me.setBranchesToMasterB = grid.NewButton("set all branches to master", func() {
|
||||
me.Disable()
|
||||
defer me.Enable()
|
||||
/*
|
||||
if setAllBranchesToMaster() {
|
||||
// if it succeeds, disable this button
|
||||
me.setBranchesToMasterB.Disable()
|
||||
}
|
||||
*/
|
||||
})
|
||||
grid.NextRow()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue