Skip to content

Instantly share code, notes, and snippets.

@WhoAteDaCake
WhoAteDaCake / deploy.js
Last active March 2, 2018 18:07
Deployment scripts
const util = require("util");
const exec = util.promisify(require("child_process").exec);
function getImageId(str) {
return str.match(/^(Successfully built)\s(.*)$/gm)[0].replace('Successfully built ', '')
}
function getContainerId(str) {
return (/^([^\s]*).*group17$/gm).exec(str)[1];
}
open Webapi.Dom;
open Element;
type state = {
mapRef: ref(option(Dom.element)),
sourceRef: ref(option(Dom.element)),
containerRef: ref(option(Dom.element)),
init: bool
};