diff options
Diffstat (limited to 'glue/build.lua')
| -rw-r--r-- | glue/build.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/glue/build.lua b/glue/build.lua new file mode 100644 index 0000000..31fe844 --- /dev/null +++ b/glue/build.lua @@ -0,0 +1,20 @@ +-- expects glue, $ go get -u github.com/Xe/tools/glue +local sh = require "sh" +sh { abort = true } + +if os.getenv("CGO_ENABLED") ~= "0" then + error("CGO_ENABLED must be set to 1") +end + +print "building glue..." +sh.go("build"):print() +sh.upx("--ultra-brute", "glue"):print() +sh.box("box.rb"):print() + +print "releasing to docker hub" +sh.docker("push", "xena/glue"):print() + +print "moving glue binary to $GOPATH/bin" +sh.mv("glue", (os.getenv("GOPATH") .. "/bin/glue")) + +print "build/release complete" |
