From 98c7b3f84aef26c7ee3ba1933f8cee27dfb93dce Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Tue, 9 Aug 2016 18:06:42 -0700 Subject: [PATCH] deploy: add `--public` option To create a deployment as "public" (`/_src` route works) when the user has a "premium" plan. --- bin/now-deploy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/now-deploy b/bin/now-deploy index 6f7d8ec..19f62a3 100755 --- a/bin/now-deploy +++ b/bin/now-deploy @@ -25,6 +25,7 @@ const argv = minimist(process.argv.slice(2), { force: 'f', forceSync: 'F', login: 'L', + public: 'p', 'no-clipboard': 'C', 'forward-npm': 'N' } @@ -50,6 +51,7 @@ const help = () => { -d, --debug debug mode [off] -f, --force force a new deployment even if nothing has changed -L, --login configure login + -p, --public deployment is public (\`/_src\` is exposed) [on for oss, off for premium] -C, --no-clipboard do not attempt to copy URL to clipboard -N, --forward-npm Forward login information to install private NPM modules @@ -102,6 +104,7 @@ const forwardNpm = argv['forward-npm']; const forceNew = argv.force; const forceSync = argv.forceSync; const shouldLogin = argv.login; +const wantsPublic = argv.public; const apiUrl = argv.url || 'https://api.zeit.co'; const isTTY = process.stdout.isTTY; const quiet = !isTTY; @@ -227,7 +230,8 @@ async function sync (token) { forceNew, forceSync, forwardNpm: alwaysForwardNpm || forwardNpm, - quiet + quiet, + public: wantsPublic }); } catch (err) { if (debug) console.log(`> [debug] error: ${err.stack}`);