This commit is contained in:
Jeff Carr 2024-12-15 17:03:41 -06:00
parent 882c448b85
commit 41671d1298
2 changed files with 17 additions and 4 deletions

View File

@ -43,7 +43,7 @@ func clone(gopath string) (*gitpb.Repo, error) {
log.Info("repo cloned failed", filepath.Join(forge.GetGoSrc(), gopath))
return nil, errors.New(fullgitdir + " was not created")
}
log.Info("onward and upward")
log.Info("go-clone clone() onward and upward")
return pb, nil
}
@ -113,7 +113,9 @@ func recursiveClone(check *gitpb.Repo) error {
func makeValidGoSum(check *gitpb.Repo) error {
if check.Exists("go.mod") {
log.Info("makeValidGoSum() attempt SetPrimitive()")
if err := check.SetPrimitive(); err != nil {
log.Info("SetPrimitive() failed", err)
return err
}
}

17
main.go
View File

@ -49,14 +49,25 @@ func main() {
}
autoWork()
if argv.Build {
if err := makeValidGoSum(workingRepo); err != nil {
badExit(err)
log.Info("STARTING BUILD", workingRepo.GoPath)
/*
if err := makeValidGoSum(workingRepo); err != nil {
badExit(err)
}
if err := build(); err != nil {
badExit(err)
}
*/
if workingRepo.RepoType() == "binary" || workingRepo.RepoType() == "plugin" {
log.Info("build will probably fail", workingRepo.GoPath, "is", workingRepo.RepoType())
}
if err := build(); err != nil {
if err := forge.Build(workingRepo, nil); err != nil {
log.Warn("BUILD FAILED", workingRepo.GoPath, err)
badExit(err)
}
}
if argv.Install {
log.Info("STARTING INSTALL", workingRepo.GoPath)
// can only install binary or plugin go packages
if workingRepo.RepoType() == "binary" || workingRepo.RepoType() == "plugin" {
log.Info("install will probably fail", workingRepo.GoPath, "is", workingRepo.RepoType())