cleaner output
This commit is contained in:
parent
9873bc3d57
commit
4a2568fea3
26
build.go
26
build.go
|
@ -48,14 +48,17 @@ func (f *Forge) doBuild(repo *gitpb.Repo, userFlags []string, goWhat string) err
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// build the protobuf files in all protobuf repos
|
// if not GoPrimitive, autogen each dependent git repo
|
||||||
all := repo.GoDeps.SortByGoPath()
|
if repo.GoDepsLen() != 0 {
|
||||||
for all.Scan() {
|
// build the protobuf files in all protobuf repos
|
||||||
t := all.Next()
|
all := repo.GoDeps.SortByGoPath()
|
||||||
found := f.Repos.FindByGoPath(t.GetGoPath())
|
for all.Scan() {
|
||||||
if found.RepoType() == "protobuf" {
|
t := all.Next()
|
||||||
if err := f.runAutogenpb(found); err != nil {
|
found := f.Repos.FindByGoPath(t.GetGoPath())
|
||||||
return err
|
if found.RepoType() == "protobuf" {
|
||||||
|
if err := f.runAutogenpb(found); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,6 +69,11 @@ func (f *Forge) doBuild(repo *gitpb.Repo, userFlags []string, goWhat string) err
|
||||||
if repo.CheckDirty() {
|
if repo.CheckDirty() {
|
||||||
version = version + "-dirty"
|
version = version + "-dirty"
|
||||||
}
|
}
|
||||||
|
if repo.RepoType() == "plugin" {
|
||||||
|
if goWhat == "install" {
|
||||||
|
return errors.New("Can not go install plugins yet")
|
||||||
|
}
|
||||||
|
}
|
||||||
cmd := []string{"go", goWhat}
|
cmd := []string{"go", goWhat}
|
||||||
|
|
||||||
// if this is a plugin, use buildmode=plugin
|
// if this is a plugin, use buildmode=plugin
|
||||||
|
@ -118,7 +126,7 @@ func (f *Forge) doBuild(repo *gitpb.Repo, userFlags []string, goWhat string) err
|
||||||
log.Info("again failed cmd", strings.Join(cmd, "a"))
|
log.Info("again failed cmd", strings.Join(cmd, "a"))
|
||||||
log.Info("again failed", strings.Join(res2.Stdout, "\n"))
|
log.Info("again failed", strings.Join(res2.Stdout, "\n"))
|
||||||
}
|
}
|
||||||
return errors.New("go build failed: " + fmt.Sprint(result.Error))
|
return errors.New("go " + goWhat + " failed: " + fmt.Sprint(result.Error))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,9 @@ func cloneActual(newdir, basedir, giturl string) (string, error) {
|
||||||
gitdir := filepath.Join(fullpath, ".git")
|
gitdir := filepath.Join(fullpath, ".git")
|
||||||
if IsDirectory(gitdir) {
|
if IsDirectory(gitdir) {
|
||||||
log.Info("git cloned worked to", fullpath)
|
log.Info("git cloned worked to", fullpath)
|
||||||
|
// also clone notes -- this can store the go.mod and go.sum files
|
||||||
|
cmd := []string{"git", "fetch", "origin", "refs/notes/*:refs/notes/*"}
|
||||||
|
shell.PathRunRealtime(fullpath, cmd)
|
||||||
return giturl, nil
|
return giturl, nil
|
||||||
}
|
}
|
||||||
// git clone didn't really work but did make a directory
|
// git clone didn't really work but did make a directory
|
||||||
|
|
Loading…
Reference in New Issue