grunt-release icon indicating copy to clipboard operation
grunt-release copied to clipboard

Add a bump-only command

Open hijonathan opened this issue 12 years ago • 9 comments

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.

hijonathan avatar Dec 04 '13 19:12 hijonathan

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

doowb avatar Dec 04 '13 20:12 doowb

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.

hijonathan avatar Dec 04 '13 20:12 hijonathan

Oh, I see... :flushed: Thanks.

doowb avatar Dec 04 '13 20:12 doowb

No problemo. Nice shirt, btw :baseball:

hijonathan avatar Dec 04 '13 20:12 hijonathan

:+1:

tomchentw avatar Dec 28 '13 15:12 tomchentw

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

geddski avatar Jan 19 '14 21:01 geddski

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?

drublic avatar Jan 05 '15 08:01 drublic

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.

scottux avatar Feb 04 '15 16:02 scottux

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

dorgan avatar May 01 '16 12:05 dorgan