peritus / bumpversion

Version-bump your software with a single command
https://pypi.python.org/pypi/bumpversion
MIT License
1.5k stars 148 forks source link

Allow executing only a subset #38

Open peritus opened 10 years ago

peritus commented 10 years ago

Some workflows require an intermediate step between changing the version strings in the files and the actual commit or tag. The current state of the implementation is all or nothing.

The workaround executing bumpversion, changing stuff and amend-commit-ing doesn't work because the tagged commit is the original, unamended one and then you'd have to delete that tag and tag the new commit and why are you using this again?

Usecases:

Could work something like this:

$> bumpversion --stage-changefiles patch
$> sphinx-build src/ out/
$> git add out/
$> bumpversion --continue

or

$> bumpversion --abort-before=commit patch
Changed files pom.xml, BUILDNUMBER, CHANGELOG.txt
Aborting before commit. After you're done modifying, execute

git commit --file=/tmp/bumpversion_commitmsg23874678236487
git tag v123.4.5 --file=/tmp/bumpversion_tagmsg23874678236487

$> git log > CHANGELOG.txt
$> # ...

or

...

roncanepa commented 8 years ago

Hello, I'm trying bumpversion for the first time and found myself at this issue and #115 because of a similar use case. Like #115, I'd like to use the following workflow:

  1. bump
  2. one or more changes + commits
  3. tag

What about making "tag" a separate command? For instance, I could bumpversion and make changes and commits. When I'm finally done, I then run bumpversion tag to have it automatically add a git tag with the most recent version. This could work well, as bumpversion already exits if the working directory isn't clean, so it could use the most recent commit as the target for the tag.

Thank you for your efforts and making bumpversion available.