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

-c should not ignore the new-version warning #417

Open
atuttle opened this issue Mar 17, 2013 · 3 comments
Open

-c should not ignore the new-version warning #417

atuttle opened this issue Mar 17, 2013 · 3 comments

Comments

@atuttle
Copy link

atuttle commented Mar 17, 2013

I have a script that combines multiple steps, like a git commit, npm version, git push, git push --tags, and jitsu deploy, all into one command. Because I'm attempting to streamline things, I put a -c on the jitsu deploy to skip the package.json write warning. I noticed today that this -c essentially answers yes to the prompt: Continue without updating? Bad things might happen (no):, which is probably not a good idea.

In this case I think it's ok to ignore the -c flag and require user input, or probably more appropriately, exit(1) with a message that -c won't bypass a new version. If it's important for people to be able to ignore new versions, I'd recommend the addition of a new flag for that purpose (perhaps -cv).

@blakmatrix
Copy link
Contributor

This is a good point, however, I am inclined to leave it as is as the -c was intended to skip prompting the user for anything that has a default value, for the primary use for automatic scripting(ie no user around). The second reason, is generally we release in patches, and while it is important to update, patches are generally non breaking, and skipping over this would be aceptable generally.

I think it'd be a good Idea to continue as is for patch releases and exit as you mentioned for major and minor releases--with of course an adequate warning/error message.

How do people feel about that?

@atuttle
Copy link
Author

atuttle commented Mar 20, 2013

Sounds good to me. I guess the change, then, would be that a patch releases would default to yes (so -c can continue to ignore it) and set the default for major + minor releases to no so that -c will exit.

@mwawrusch
Copy link

exit(1) on major release change would be nice for all of us who do CD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants