minor
This commit is contained in:
parent
0ca1240c75
commit
6c5a858125
|
@ -13,7 +13,7 @@ func (repo *Repo) CheckoutMaster() bool {
|
||||||
func (repo *Repo) CheckoutDevel() bool {
|
func (repo *Repo) CheckoutDevel() bool {
|
||||||
bName := repo.GetDevelBranchName()
|
bName := repo.GetDevelBranchName()
|
||||||
if repo.checkoutBranch(bName) {
|
if repo.checkoutBranch(bName) {
|
||||||
repo.UserBranchName = bName
|
repo.DevelBranchName = bName
|
||||||
return true
|
return true
|
||||||
// switch ok
|
// switch ok
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ func (all *Repos) ConfigSave() error {
|
||||||
log.Info("gitpb proto.Marshal() failed len", len(data), err)
|
log.Info("gitpb proto.Marshal() failed len", len(data), err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
log.Info("gitpb.ConfigSave() repos.Marshal() worked len", len(data))
|
log.Info("gitpb.ConfigSave() repos.Marshal() worked len", len(all.Repos), "repos")
|
||||||
configWrite("repos.pb", data)
|
configWrite("repos.pb", data)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,6 @@ func (repo *Repo) ParseGoSum() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
scanner := bufio.NewScanner(gosum)
|
scanner := bufio.NewScanner(gosum)
|
||||||
log.Info("gosum:", tmp)
|
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
line := strings.TrimSpace(scanner.Text())
|
line := strings.TrimSpace(scanner.Text())
|
||||||
|
|
||||||
|
@ -69,50 +68,3 @@ func (repo *Repo) ParseGoSum() bool {
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
// reads and parses the go.sum file
|
|
||||||
// is identical to the one above, change that
|
|
||||||
func (repo *Repo) UpdatePublished() (bool, error) {
|
|
||||||
// empty out what was there before
|
|
||||||
repo.Published = nil
|
|
||||||
tmp := filepath.Join(repo.FullPath, "go.sum")
|
|
||||||
gosum, err := os.Open(tmp)
|
|
||||||
if err != nil {
|
|
||||||
log.Warn("missing go.sum", repo.FullPath)
|
|
||||||
return false, err
|
|
||||||
}
|
|
||||||
defer gosum.Close()
|
|
||||||
|
|
||||||
scanner := bufio.NewScanner(gosum)
|
|
||||||
log.Info("gosum:", tmp)
|
|
||||||
for scanner.Scan() {
|
|
||||||
line := strings.TrimSpace(scanner.Text())
|
|
||||||
|
|
||||||
parts := strings.Split(line, " ")
|
|
||||||
if len(parts) == 3 {
|
|
||||||
godep := strings.TrimSpace(parts[0])
|
|
||||||
version := strings.TrimSpace(parts[1])
|
|
||||||
if strings.HasSuffix(version, "/go.mod") {
|
|
||||||
version = strings.TrimSuffix(version, "/go.mod")
|
|
||||||
}
|
|
||||||
new1 := GoDep{
|
|
||||||
GoPath: godep,
|
|
||||||
Version: version,
|
|
||||||
}
|
|
||||||
if repo.Published == nil {
|
|
||||||
repo.Published = new(GoDeps)
|
|
||||||
}
|
|
||||||
repo.Published.AppendUniqueGoPath(&new1)
|
|
||||||
} else {
|
|
||||||
return false, errors.New("go.sum parse error invalid: " + line)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := scanner.Err(); err != nil {
|
|
||||||
repo.Published = nil
|
|
||||||
return false, err
|
|
||||||
}
|
|
||||||
return true, nil
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
Loading…
Reference in New Issue