aboutsummaryrefslogtreecommitdiffstats
path: root/deploy-ui-gcs/trigger.js
blob: bc019e46e1fb1243ec4027f5a6c50376421b77d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
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 })