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")