minor improvments
This commit is contained in:
parent
e127f53bd4
commit
e5a5454bc0
|
@ -0,0 +1,10 @@
|
||||||
|
package gitpb
|
||||||
|
|
||||||
|
// does this repo build a binary?
|
||||||
|
func (r *Repo) IsBinary() bool {
|
||||||
|
if r.GoInfo != nil {
|
||||||
|
return r.GoInfo.GetGoBinary()
|
||||||
|
}
|
||||||
|
// todo: detect C & other language binary packages
|
||||||
|
return false
|
||||||
|
}
|
2
rill.go
2
rill.go
|
@ -29,7 +29,7 @@ func (repo *Repo) GitPull() (*cmd.Status, error) {
|
||||||
*/
|
*/
|
||||||
var cmd []string
|
var cmd []string
|
||||||
cmd = append(cmd, "git", "pull")
|
cmd = append(cmd, "git", "pull")
|
||||||
return repo.RunVerbose(cmd)
|
return nil, repo.RunVerbose(cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
// rill is awesome. long live rill
|
// rill is awesome. long live rill
|
||||||
|
|
15
shell.go
15
shell.go
|
@ -136,19 +136,14 @@ func (repo *Repo) RunStrictAll(all [][]string) (*cmd.Status, error) {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (repo *Repo) RunVerbose(cmd []string) (*cmd.Status, error) {
|
func (repo *Repo) RunVerbose(cmd []string) error {
|
||||||
log.Info("Running:", repo.GetGoPath(), cmd)
|
log.Info("EXEC Running:", repo.GetGoPath(), cmd)
|
||||||
r, err := repo.RunStrict(cmd)
|
err := shell.PathExecVerbose(repo.GetFullPath(), cmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Info("Error", cmd, err)
|
log.Info("Error", cmd, err)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
for _, line := range r.Stdout {
|
return nil
|
||||||
log.Info(line)
|
|
||||||
}
|
|
||||||
for _, line := range r.Stderr {
|
|
||||||
log.Info(line)
|
|
||||||
}
|
|
||||||
return r, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (repo *Repo) RunVerboseOnError(cmd []string) (*cmd.Status, error) {
|
func (repo *Repo) RunVerboseOnError(cmd []string) (*cmd.Status, error) {
|
||||||
|
|
Loading…
Reference in New Issue