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