diff options
| author | Christine Dodrill <me@christine.website> | 2017-01-12 11:01:28 -0800 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2017-01-12 11:01:28 -0800 |
| commit | 0df20ebe2d6061ca8a0f2be30a2a654f30f46f52 (patch) | |
| tree | 2d960e94cc84be02813a91ac13c03ec6b67d6942 /glue/build.lua | |
| parent | 906a7b686c5ed845c4c0b40c34b94af7651a8d3e (diff) | |
| download | x-0df20ebe2d6061ca8a0f2be30a2a654f30f46f52.tar.xz x-0df20ebe2d6061ca8a0f2be30a2a654f30f46f52.zip | |
glue: add expect
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" |
