From fd606658a73f1a764726621fdeb3f973e72c50a9 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Tue, 17 Jan 2017 15:35:14 -0800 Subject: [PATCH] containermake: add lua replacement --- containermake.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 containermake.lua diff --git a/containermake.lua b/containermake.lua new file mode 100644 index 0000000..b4a7403 --- /dev/null +++ b/containermake.lua @@ -0,0 +1,28 @@ +local sh = require "sh" +local fs = require "fs" + +sh { abort = true } + +local cd = function(path) + local ok, err = fs.chdir(path) + if err ~= nil then + error(err) + end +end + +cd "frontend" +sh.rm("-rf", "node_modules", "bower_components"):ok() +print "running npm install..." +sh.npm("install"):print() +print "running npm run build..." +sh.npm("run", "build"):print() +print "packing frontend..." +sh.asar("pack", "static", "../frontend.asar"):print() +cd ".." + +if fs.exists "/usr/bin/keybase" then + print "signing frontend..." + sh.keybase("sign", "-d", "-i", "./frontend.asar", "-o", "./frontend.asar.sig"):print() +end + +sh.box("box.rb"):print()