add argv --keep-files
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
ea894bdfe0
commit
32c023ac38
3
Makefile
3
Makefile
|
@ -44,6 +44,9 @@ build-go-gui-toolkits: build
|
|||
build-test-failure: build
|
||||
./go-deb --release --no-gui --repo go.wit.com/apps/junk
|
||||
|
||||
build-test-keep-files: build
|
||||
./go-deb --no-gui --keep-files --repo go.wit.com/apps/go-deb
|
||||
|
||||
build-all:
|
||||
go-deb --no-gui --repo go.wit.com/apps/autotypist
|
||||
go-deb --no-gui --repo go.wit.com/apps/control-panel-digitalocean
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
@ -59,6 +60,11 @@ func (c *controlBox) addRepo(path string) {
|
|||
log.Info("path did not work", path, err)
|
||||
return
|
||||
}
|
||||
if repo == nil {
|
||||
log.Info("repo == nil", path, err)
|
||||
os.Exit(-1)
|
||||
return
|
||||
}
|
||||
c.status = repo
|
||||
// c.status.SetMainWorkingName("master")
|
||||
// c.status.SetDevelWorkingName("devel")
|
||||
|
|
|
@ -151,6 +151,10 @@ func (c *controlBox) buildPackage() (bool, error) {
|
|||
shell.Run([]string{"cp", "postinst", "files/DEBIAN/"})
|
||||
}
|
||||
|
||||
if c.status == nil {
|
||||
log.Warn("c.status == nil")
|
||||
panic(-1)
|
||||
}
|
||||
// experiment for the toolkit package
|
||||
// if the git repo has a "./build" script run it before packaging
|
||||
// this way the user can put custom files in the .deb package
|
||||
|
|
10
main.go
10
main.go
|
@ -47,8 +47,18 @@ func main() {
|
|||
cBox.computeControlValues()
|
||||
// verify the values for the package
|
||||
|
||||
if cBox.status == nil {
|
||||
log.Info("argv.Repo =", argv.Repo)
|
||||
log.Info("repo not found. Try:")
|
||||
log.Info("")
|
||||
log.Info(" go-clone", argv.Repo)
|
||||
log.Info("")
|
||||
os.Exit(-1)
|
||||
}
|
||||
|
||||
if argv.NoGui {
|
||||
shell.TestTerminalColor()
|
||||
// basicWindow.Show() // broken gui package. convert to protobuf
|
||||
if ok, err := cBox.buildPackage(); ok {
|
||||
log.Info("build worked")
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue