rill git pull works with small settings
This commit is contained in:
parent
1d352604b9
commit
aff3268ca6
2
Makefile
2
Makefile
|
@ -50,6 +50,8 @@ scan: install
|
||||||
reset
|
reset
|
||||||
forge --do-scan
|
forge --do-scan
|
||||||
|
|
||||||
|
pull: install
|
||||||
|
forge --do-git-pull
|
||||||
|
|
||||||
mine: install
|
mine: install
|
||||||
forge --find-mine
|
forge --find-mine
|
||||||
|
|
28
doCommon.go
28
doCommon.go
|
@ -1,13 +1,37 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "go.wit.com/log"
|
import (
|
||||||
|
"go.wit.com/lib/protobuf/gitpb"
|
||||||
|
"go.wit.com/log"
|
||||||
|
)
|
||||||
|
|
||||||
func doScan() {
|
func doScan() {
|
||||||
me.forge.ScanGoSrc()
|
me.forge.ScanGoSrc()
|
||||||
}
|
}
|
||||||
|
|
||||||
func doGitPull() {
|
func doGitPull() {
|
||||||
me.found.RillGitPull()
|
allerr := me.found.RillGitPull(40, 5)
|
||||||
|
|
||||||
|
all := me.found.SortByGoPath()
|
||||||
|
for all.Scan() {
|
||||||
|
repo := all.Next()
|
||||||
|
result := allerr[repo]
|
||||||
|
if result.Error == gitpb.ErrorGitPullOnDirty {
|
||||||
|
log.Info("skip git pull. repo is dirty", repo.GoPath)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if result.Error == gitpb.ErrorGitPullOnLocal {
|
||||||
|
log.Info("skip git pull. local branch ", repo.GoPath)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if result.Exit == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Info("git pull error:", repo.GoPath, result.Error)
|
||||||
|
log.Info("git pull error:", repo.GoPath, result.Stdout)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func doFix() {
|
func doFix() {
|
||||||
|
|
Loading…
Reference in New Issue