35 lines
667 B
Go
35 lines
667 B
Go
|
package main
|
||
|
|
||
|
/*
|
||
|
this parses the command line arguements
|
||
|
this enables command line options from other packages like 'gui' and 'log'
|
||
|
*/
|
||
|
|
||
|
import (
|
||
|
"go.wit.com/log"
|
||
|
)
|
||
|
|
||
|
// okay
|
||
|
func checkoutDevel() bool {
|
||
|
log.Info("running git checkout devel everwhere")
|
||
|
var failed int = 0
|
||
|
var count int = 0
|
||
|
loop := me.repos.View.ReposSortByName()
|
||
|
for loop.Scan() {
|
||
|
repo := loop.Repo()
|
||
|
count += 1
|
||
|
|
||
|
// don't switch branches on readonly repos
|
||
|
if me.forge.IsReadOnly(repo.GoPath()) {
|
||
|
continue
|
||
|
}
|
||
|
if repo.Status.CheckoutDevel() {
|
||
|
// checkout ok
|
||
|
} else {
|
||
|
failed += 1
|
||
|
}
|
||
|
}
|
||
|
log.Info("Ran git checkout in", count, "repos. failure count =", failed)
|
||
|
return true
|
||
|
}
|