use shell.md5sum()

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-06-13 19:31:13 -07:00
parent 94e8de285c
commit eafbc6d8a3
2 changed files with 9 additions and 17 deletions

View File

@ -1,29 +1,22 @@
package main 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 "log"
import "fmt" import "fmt"
import "time" import "time"
// import "github.com/davecgh/go-spew/spew"
import "git.wit.com/wit/shell" import "git.wit.com/wit/shell"
// import "os/user"
// import "io/ioutil"
// github.com/bramvdbogaerde/go-scp
var filename string var filename string
var builddir string
func main() { func main() {
filename := "cloud-control-panel"
// shell.Quiet(true)
shell.Quiet(false) shell.Quiet(false)
filename = shell.Execname("cloud-control-panel") // returns the right name for each OS
gitref := shell.Run("git rev-list -1 HEAD") gitref := shell.Run("git rev-list -1 HEAD")
// setup the files that will end up in the binary // setup the files that will end up in the binary
@ -35,15 +28,13 @@ func main() {
shell.Run("rm " + filename) shell.Run("rm " + filename)
shell.Run("packr build") shell.Run("packr build")
log.Println("build finished") log.Println("build finished")
/*
md5sum = shell.Run("md5sum " + filename) md5sum := shell.Md5sum(filename)
log.Println("\tmd5sum =", md5sum) log.Println("\tmd5sum =", md5sum)
if (md5sum == "") { if (md5sum == "") {
log.Println("\tBUILD FAILED") log.Println("\tBUILD FAILED")
b = false return
return &b
} }
shell.Write("/tmp/autobuild.md5sum", md5sum) shell.Write("/tmp/build.md5sum", md5sum)
*/
} }

1
resources/tags/v0.6.34 Normal file
View File

@ -0,0 +1 @@
94e8de285cfe9a2027836c57bfd6ba6c96610346