From 44ad12b39a85f11a2a841c59ce89518cc26db77c Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Mon, 27 May 2019 20:55:30 +0300 Subject: [PATCH] ${} --- deploy.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deploy.ts b/deploy.ts index 9e4dc27..8b2a061 100644 --- a/deploy.ts +++ b/deploy.ts @@ -2,6 +2,11 @@ import { publish } from "gh-pages" import { exec } from "child_process" const args = process.argv.splice(2) +const argsNoFlags = args.filter(val => val[0] !== "-") + + +const mFlag = ((args.indexOf("--message") + 1) || (args.indexOf("-m") + 1)) - 1 +const message = (mFlag) ? args[mFlag + 1] : "automated update" console.log("Deploying..."); @@ -25,7 +30,7 @@ const run = (command: string): Promise => { if (!args.includes("--skipBuild") && !args.includes("-sb")) await run("npm run build") await run("git add .") - await run('git commit -m "automated update"') + await run('git commit -m "${}"') await run("git push origin master") await new Promise((res, rej) => { console.log("🏃 Updating github pages")