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

Add a bump-only command #59

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

hijonathan
Copy link

This adds the ability to do a two-step release, a la:

grunt.registerTask 'publish', ['clean', 'bump-only', 'build', 'release']

This is an enviable feature of grunt-bump. Would also resolve #53

There weren't many tests to code against, so I'd love some help on that front in case I missed anything obvious.

@doowb
Copy link

doowb commented Dec 4, 2013

If you use both bump-only and release, won't it update the version twice?

@hijonathan
Copy link
Author

Yes. If you're planning to use bump-only and release together, you'd need to specify bump: false in your release options. The bump-only command only uses the file property from release's options.

@doowb
Copy link

doowb commented Dec 4, 2013

Oh, I see... 😳 Thanks.

@hijonathan
Copy link
Author

No problemo. Nice shirt, btw ⚾

@tomchentw
Copy link

👍

@geddski
Copy link
Owner

geddski commented Jan 19, 2014

Another case that leads me to believe all the tasks should be separated out so you can run separately.

@@ -10,8 +10,16 @@ var shell = require('shelljs');
var semver = require('semver');

module.exports = function(grunt){
grunt.registerTask('bump-only', 'bump version only', function(type){
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be registerMultiTask.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please also change bump-only to release-bump since bump is a subset of release and I believe we should "namespace" it here.

@drublic
Copy link
Collaborator

drublic commented Jan 5, 2015

Thanks for the contribution.

I am not sure if there is a real use-case for this feature. Do you want to commit and tag stuff before you run your build job? I don't think so. Your release might be buggy.
To me it seems that you should run grunt release separately with high confidence that you really want to publish a new version.
What do you think?

@scottux
Copy link

scottux commented Feb 4, 2015

I have a use case for this actually, I was using the version from package.json in a comment that is written into the concatenated and minified output files. It is now one version off and it isn't JSON so i can't simply tack it into additionalFiles. It would be cool if we could scan through files looking for a pattern like <% version %> or something and replace it as well as package.json/bower.json.

@dorgan
Copy link
Collaborator

dorgan commented May 1, 2016

@scottux I use the string-replace grunt package to do exactly what you are talking about.

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

Successfully merging this pull request may close these issues.

7 participants