aboutsummaryrefslogtreecommitdiffstats
path: root/deploy-ui-gcs/trigger.js
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2022-02-06 17:08:22 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2022-02-11 15:24:52 +0200
commit664e622fbb5d528e14d42da7baf9505b79f3d041 (patch)
tree7cb89d71aa9650a4c009be5c4be1f043a8797743 /deploy-ui-gcs/trigger.js
Initial commit
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 })