save Published() go deps
This commit is contained in:
parent
d132639049
commit
339c88ccbd
5
build.go
5
build.go
|
@ -48,6 +48,11 @@ func (f *Forge) Build(repo *gitpb.Repo, userFlags []string) error {
|
|||
t := loop1.Next()
|
||||
log.Info("Build() dep:", t.GetGoPath(), t.GetVersion())
|
||||
}
|
||||
loop2 := repo.Published.SortByGoPath()
|
||||
for loop2.Scan() {
|
||||
t := loop2.Next()
|
||||
log.Info("Build() pub:", t.GetGoPath(), t.GetVersion())
|
||||
}
|
||||
log.Info("Build() dep len:", repo.GoDeps.Len())
|
||||
os.Exit(-1)
|
||||
|
||||
|
|
41
repoNew.go
41
repoNew.go
|
@ -45,3 +45,44 @@ func (f *Forge) NewGoPath(gopath string) (*gitpb.Repo, error) {
|
|||
|
||||
// return newr, err
|
||||
}
|
||||
|
||||
func (f *Forge) VerifyBranchNames(newr *gitpb.Repo) {
|
||||
// log.Info("init worked for", newr.GoPath)
|
||||
|
||||
if newr.GetMasterBranchName() == "" {
|
||||
// try to guess what the 'master' branch is
|
||||
if newr.IsBranch("guimaster") {
|
||||
newr.SetMasterBranchName("guimaster")
|
||||
} else if newr.IsBranch("master") {
|
||||
newr.SetMasterBranchName("master")
|
||||
} else if newr.IsBranch("main") {
|
||||
newr.SetMasterBranchName("main")
|
||||
} else {
|
||||
newr.SetMasterBranchName("masterFIXME")
|
||||
}
|
||||
}
|
||||
|
||||
if f.IsReadOnly(newr.GoPath) {
|
||||
return
|
||||
}
|
||||
|
||||
if newr.GetDevelBranchName() == "" {
|
||||
if newr.IsBranch("guidevel") {
|
||||
newr.SetDevelBranchName("guidevel")
|
||||
} else if newr.IsBranch("devel") {
|
||||
newr.SetDevelBranchName("devel")
|
||||
} else {
|
||||
newr.SetDevelBranchName("develFIXME")
|
||||
}
|
||||
}
|
||||
|
||||
if newr.GetUserBranchName() == "" {
|
||||
usr, _ := user.Current()
|
||||
uname := usr.Username
|
||||
if newr.IsBranch(uname) {
|
||||
newr.SetUserBranchName(uname)
|
||||
} else {
|
||||
newr.SetUserBranchName(uname + "FIXME")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue