make devel and user branches locally
This commit is contained in:
parent
6ea78a6e8b
commit
2b090019a9
27
doCommon.go
27
doCommon.go
|
@ -35,22 +35,43 @@ func doGitPull() {
|
|||
}
|
||||
|
||||
func doFix() {
|
||||
var fixed bool = false
|
||||
all := me.found.SortByGoPath()
|
||||
for all.Scan() {
|
||||
repo := all.Next()
|
||||
if !repo.IsValid() {
|
||||
log.Printf("%10s %-50s", "old?\n", repo.GoPath)
|
||||
me.forge.Repos.DeleteByGoPath(repo.GoPath)
|
||||
fixed = true
|
||||
configSave = true
|
||||
continue
|
||||
}
|
||||
log.Printf("running on: %-50s\n", repo.GetGoPath())
|
||||
cmd := []string{"ls"}
|
||||
repo.Run(cmd)
|
||||
if err := checkoutBranches(repo); err != nil {
|
||||
badExit(err)
|
||||
}
|
||||
if fixed {
|
||||
}
|
||||
if configSave {
|
||||
me.forge.Repos.ConfigSave()
|
||||
okExit("config saved")
|
||||
}
|
||||
}
|
||||
|
||||
func checkoutBranches(repo *gitpb.Repo) error {
|
||||
dname := repo.GetDevelBranchName()
|
||||
if dname == "" {
|
||||
if err := me.forge.MakeDevelBranch(repo); err != nil {
|
||||
log.Info("verify() no devel branch name", repo.GoPath)
|
||||
return err
|
||||
}
|
||||
configSave = true
|
||||
}
|
||||
if repo.GetUserBranchName() == "" {
|
||||
if err := me.forge.MakeUserBranch(repo); err != nil {
|
||||
log.Info("verify() no devel branch name", repo.GoPath)
|
||||
return err
|
||||
}
|
||||
configSave = true
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue