aboutsummaryrefslogtreecommitdiffstats
path: root/deploy-ui-gcs/trigger.js
diff options
context:
space:
mode:
Diffstat (limited to 'deploy-ui-gcs/trigger.js')
-rw-r--r--deploy-ui-gcs/trigger.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/deploy-ui-gcs/trigger.js b/deploy-ui-gcs/trigger.js
new file mode 100644
index 0000000..bc019e4
--- /dev/null
+++ b/deploy-ui-gcs/trigger.js
@@ -0,0 +1,12 @@
+const process = require("process")
+const { deployPubSub } = require("./index")
+
+if (process.argv.length !== 3) {
+ console.log("called with:", process.argv)
+ throw new Error("Usage: node trigger.js REVISION")
+}
+const arg = process.argv[2]
+
+const json = JSON.stringify({ revision: arg })
+const b64 = Buffer.from(json, "utf8").toString("base64")
+deployPubSub({ data: b64 })