From eafbc6d8a3e7e0436fb4cb8328e6e84baf083d0b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 13 Jun 2019 19:31:13 -0700 Subject: [PATCH] use shell.md5sum() Signed-off-by: Jeff Carr --- build/build.go | 25 ++++++++----------------- resources/tags/v0.6.34 | 1 + 2 files changed, 9 insertions(+), 17 deletions(-) create mode 100644 resources/tags/v0.6.34 diff --git a/build/build.go b/build/build.go index 12b14f5..f68c294 100644 --- a/build/build.go +++ b/build/build.go @@ -1,29 +1,22 @@ package main -// This should build and upload the binary to mirrors +// This should build the control panel correctly on each platform -// upload binary to mirrors.wit.com/cloud/control-panel +// Then, upload the binaries to mirrors.wit.com/cloud/control-panel import "log" import "fmt" import "time" -// import "github.com/davecgh/go-spew/spew" - import "git.wit.com/wit/shell" -// import "os/user" -// import "io/ioutil" -// github.com/bramvdbogaerde/go-scp - var filename string -var builddir string func main() { - filename := "cloud-control-panel" - // shell.Quiet(true) shell.Quiet(false) + filename = shell.Execname("cloud-control-panel") // returns the right name for each OS + gitref := shell.Run("git rev-list -1 HEAD") // setup the files that will end up in the binary @@ -35,15 +28,13 @@ func main() { shell.Run("rm " + filename) shell.Run("packr build") log.Println("build finished") - /* - md5sum = shell.Run("md5sum " + filename) + + md5sum := shell.Md5sum(filename) log.Println("\tmd5sum =", md5sum) if (md5sum == "") { log.Println("\tBUILD FAILED") - b = false - return &b + return } - shell.Write("/tmp/autobuild.md5sum", md5sum) - */ + shell.Write("/tmp/build.md5sum", md5sum) } diff --git a/resources/tags/v0.6.34 b/resources/tags/v0.6.34 new file mode 100644 index 0000000..a964a31 --- /dev/null +++ b/resources/tags/v0.6.34 @@ -0,0 +1 @@ +94e8de285cfe9a2027836c57bfd6ba6c96610346