summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--addRepo.go6
-rw-r--r--buildPackage.go4
-rw-r--r--main.go10
4 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a72669c..7e46b2d 100644
--- a/Makefile
+++ b/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
diff --git a/addRepo.go b/addRepo.go
index 9b6d0eb..6f6e7f4 100644
--- a/addRepo.go
+++ b/addRepo.go
@@ -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")
diff --git a/buildPackage.go b/buildPackage.go
index bf201c3..8c18df1 100644
--- a/buildPackage.go
+++ b/buildPackage.go
@@ -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
diff --git a/main.go b/main.go
index 4c239c0..921a787 100644
--- a/main.go
+++ b/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 {