From 3f4d419f7858e5426aaa81cecea41557cf0f3471 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Sat, 3 Dec 2016 12:54:06 +0100 Subject: [PATCH] Force new deployment if -n or -p defined This closes #136 --- bin/now-deploy.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/now-deploy.js b/bin/now-deploy.js index fe99f5e..56918dd 100755 --- a/bin/now-deploy.js +++ b/bin/now-deploy.js @@ -145,10 +145,10 @@ const exit = code => { } // options +let forceNew = argv.force const debug = argv.debug const clipboard = !argv['no-clipboard'] const forwardNpm = argv['forward-npm'] -const forceNew = argv.force const forceSync = argv.forceSync const shouldLogin = argv.login const wantsPublic = argv.public @@ -161,6 +161,14 @@ if (argv.config) { cfg.setConfigFile(argv.config) } +// Create a new deployment if user changed +// the name or made _src public. +// This should just work fine because it doesn't +// force a new sync, it just forces a new deployment. +if (deploymentName || wantsPublic) { + forceNew = true +} + const config = cfg.read() const alwaysForwardNpm = config.forwardNpm