Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[now-cli] Disable --prod and --target for Now 1.0 deployments #3189

Merged
merged 10 commits into from
Oct 23, 2019

Conversation

lucleray
Copy link
Member

@lucleray lucleray commented Oct 23, 2019

This PR disables Now 1.0 production deployments with the following error message:

Option --prod is not supported for Now 1.0 deployments. To manually alias a deployment, use now alias instead.

It looks like this:
Capture d’écran 2019-10-23 à 19 42 09

Also disables --target for Now 1.0 deployments.

@lucleray lucleray requested a review from leo October 23, 2019 16:59
@lucleray lucleray marked this pull request as ready for review October 23, 2019 16:59
if (argv.prod) {
error(
`Now 1.0 does not support Production Deployments. Please use Now 2.0 to take advantage this feature: ${link(
'https://zeit.co/upgrade'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also tell the user how to achieve what they want for the 1.0 deployment? (i.e. manual now alias or whatever?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do that 👍

Copy link
Member Author

@lucleray lucleray Oct 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option --prod is not supported for Now 1.0 deployments. To manually alias a deployment, use now alias instead.

(and I drop the "update" message)
What do you think @leo @TooTallNate ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great! But let's make now alias use a code snippet.

@lucleray lucleray changed the title [now-cli] Disable now --prod for Now 1.0 deployments [now-cli] Disable --prod and --target for Now 1.0 deployments Oct 23, 2019
@codecov-io
Copy link

Codecov Report

Merging #3189 into canary will increase coverage by 0.2%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           canary    #3189     +/-   ##
=========================================
+ Coverage   13.33%   13.54%   +0.2%     
=========================================
  Files         268      268             
  Lines       10312    10339     +27     
  Branches     1211     1214      +3     
=========================================
+ Hits         1375     1400     +25     
  Misses       8877     8877             
- Partials       60       62      +2
Impacted Files Coverage Δ
src/util/dev/router.ts 82.35% <0%> (-0.34%) ⬇️
src/commands/deploy/args.js 0% <0%> (ø) ⬆️
src/commands/deploy/legacy.ts 0% <0%> (ø) ⬆️
src/util/dev/server.ts 64.8% <0%> (+0.32%) ⬆️
src/util/dev/validate.ts 87.87% <0%> (+27.87%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94a2b01...9dc82b4. Read the comment docs.

@kodiakhq kodiakhq bot merged commit bdf78ef into canary Oct 23, 2019
@kodiakhq kodiakhq bot deleted the disable-now-1-prod branch October 23, 2019 20:26
leo pushed a commit that referenced this pull request Oct 25, 2019
)

This PR disables Now 1.0 production deployments with the following error message:

> Option --prod is not supported for Now 1.0 deployments. To manually alias a deployment, use `now alias` instead.

It looks like this:
<img width="835" alt="Capture d’écran 2019-10-23 à 19 42 09" src="https://user-images.githubusercontent.com/6616955/67419574-3e125380-f5cd-11e9-81ff-63bde292539b.png">

Also disables `--target` for Now 1.0 deployments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants