Skip to content

Setup bumpversion#1062

Closed
webyneter wants to merge 7 commits intocookiecutter:masterfrom
webyneter:setup-bumpversion
Closed

Setup bumpversion#1062
webyneter wants to merge 7 commits intocookiecutter:masterfrom
webyneter:setup-bumpversion

Conversation

@webyneter
Copy link
Copy Markdown
Contributor

@webyneter webyneter commented Mar 1, 2017

  • Create use_bumpversion cookiecutter option.
  • Require bumpversion==0.5.3 locally.
  • Refactor version resolution in ./docs/conf.py: Now, there's a single 'source of truth', the release variable representing 'the full version, including alpha/beta/rc tags', allowing the version to be derived dynamically from itself.
  • Provide bumpversion config file pinpointing project version in ./package.json (the version attribute), ./{{cookiecutter.project_slug}}/__init__.py (the __version__ variable), and ./docs/conf.py (the release variable).

N.B. The whole point of refactoring ./docs/conf.py was indeed to faciilitate seamless version bumping.

- Create `use_bumpversion` cookiecutter option.
- Require `bumpversion==0.5.3` locally.
- Refactor version resolution in `./docs/conf.py`: Now, there's a single 'source of truth', the `release` variable representing 'the full version, including alpha/beta/rc tags', allowing the `version` to be derived dynamically from itself.
- Provide bumpversion config file pinpointing project version in `./package.json` (the `version` attribute), `./{{cookiecutter.project_slug}}/__init__.py` (the `__version__` variable), and ./docs/conf.py (the `release` variable).
N.B. The whole point of refactoring `./docs/conf.py` was indeed to faciilitate seamless version bumping.
@webyneter
Copy link
Copy Markdown
Contributor Author

For now, bumpversion lacks full-fledged support for pre-releases (as semver prescribes). I've come up with a trivial workaround (still, not abiding to semver to the utmost extent) working in a following manner:

0.1.0
bumpversion pre0.1.0-1.0
bumpversion prenum0.1.0-1.1
bumpversion prenum0.1.0-1.2
bumpversion major1.0.0.

- Create `use_bumpversion` cookiecutter option.
- Require `bumpversion==0.5.3` locally.
- Refactor version resolution in `./docs/conf.py`: Now, there's a single 'source of truth', the `release` variable representing 'the full version, including alpha/beta/rc tags', allowing the `version` to be derived dynamically from itself.
- Provide bumpversion config file pinpointing project version in `./package.json` (the `version` attribute), `./{{cookiecutter.project_slug}}/__init__.py` (the `__version__` variable), and ./docs/conf.py (the `release` variable).
N.B. The whole point of refactoring `./docs/conf.py` was indeed to faciilitate seamless version bumping.
@webyneter webyneter requested review from jayfk, luzfcb and pydanny April 24, 2017 18:11
@luzfcb
Copy link
Copy Markdown
Collaborator

luzfcb commented Apr 24, 2017

Apparently, bumpversion has no active maintainer in it since 2015.
To my understanding, we should avoid using it, due to the first rule: https://github.com/pydanny/cookiecutter-django#constraints

That said, there is this fork https://github.com/c4urself/bump2version but I've never used it.

@webyneter
Copy link
Copy Markdown
Contributor Author

@luzfcb, I see, you're right. I'm closing the PR.

@webyneter webyneter closed this Apr 24, 2017
@webyneter webyneter deleted the setup-bumpversion branch April 24, 2017 18:53
@luzfcb
Copy link
Copy Markdown
Collaborator

luzfcb commented Apr 24, 2017

I am +1 to add any actively maintained library and that does something similar to bumpversion and a minimum documentation of how to use.

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.

2 participants