diff options
| -rw-r--r-- | doBuild.go | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -10,6 +10,7 @@ import ( "strings" "go.wit.com/lib/cobol" + "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/argvpb" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" @@ -83,7 +84,7 @@ func doBuild() (string, error) { // log.Info("MAKE DEB FOR:", i, path, debname, arches) bcount := fmt.Sprintf("%d", p.GetBuildCount()) var newcount string - smartver := p.GetSmartVersion() + smartver := "v" + p.GetSmartVersion() curver := repo.GetCurrentVersion() if smartver == curver { newcount = fmt.Sprintf("%d", p.GetBuildCount()+1) @@ -99,14 +100,23 @@ func doBuild() (string, error) { tobuild.Clone(repo) cmd := makeGoDebCmd(repo, newcount, "") cmdstr := fmt.Sprintf("%v", cmd) - simpletable = append(simpletable, []string{debname, p.Version, age, p.GetSmartVersion(), bcount, curver, newcount, arches, cmdstr}) - repo.RunVerbose(cmd) + simpletable = append(simpletable, []string{debname, p.Version, age, smartver, bcount, curver, newcount, arches, cmdstr}) + if !argv.DryRun { + err := repo.RunVerbose(cmd) + if err != nil { + argvpb.BadExit("go-deb failed", err) + } + } // argvpb.GoodExit("built 1") } footer := cobol.SimpleTable(simpletable) log.Info("simple build table footer:", footer) + if !argv.DryRun { + shell.RunVerbose([]string{"do-aptly"}) + } + argv.DryRun = true // for r := range tobuild.IterAll() { // } |
