Hooks¶
Read the doc¶
This hook allow to change the Read The Doc documentation URL in both bump and prepare phase.
key:
readthedoc
- parameters
- id:
None
- url:
http://{id}.readthedocs.org/en/{tag}
- bump:
{version}
- prepare:
latest
- id:
Most of the the time, you will just have to specify your readthedoc project identifier.
[readthedoc]
id = myproject
You can customize the generated (and parsed) URL and the string to bump in.
[readthedoc]
url = http://custom.doc/{tag}
You can also customize the tag part in the url for the bump and prepare phase
[readthedoc]
bump = {version}
prepare = lastest
Changelog¶
This hook allow to bump and prepare your changelog. In the bump phase it will bump the current developpement header with a versionned one. In the prepare phase, it will do the inverse operation.
key:
changelog
- parameters
- file:
None
- separator:
-
- bump:
{version} ({date:%Y-%m-%d})'
- prepare:
Current
- empty:
Nothing yet
- file:
The file parameter is mandatory and designate the changelog file.
The separator parameter spcify the character user to underline your changelog section.
Changelog
=========
In development
~~~~~~~~~~~~~~
- Another feature
Version 1.0.1 (2013-08-23)
~~~~~~~~~~~~~~~~~~~~~~~~~~
- Some new feature
To handle this changelog you will have the following configuration
[changelog]
file = CHANGELOG
separator = ~
bump = Version {version} ({date:%Y-%m-%d})
prepare = In development
empty = Empty
If you execute Bump’R, the changelog will be bumped like:
Changelog
=========
Version 1.0.2 (2013-08-24)
~~~~~~~~~~~~~~~~~~~~~~~~~~
- Another feature
Version 1.0.1 (2013-08-23)
~~~~~~~~~~~~~~~~~~~~~~~~~~
- Some new feature
And then prepared:
Changelog
=========
In development
~~~~~~~~~~~~~~
- Empty
Version 1.0.2 (2013-08-24)
~~~~~~~~~~~~~~~~~~~~~~~~~~
- Another feature
Version 1.0.1 (2013-08-23)
~~~~~~~~~~~~~~~~~~~~~~~~~~
- Some new feature
Commands¶
This hook allow to execute custom commands during bump and prepare phases.
key:
commands
- parameters
- bump:
{version}
- prepare:
latest
- bump:
Both bump and prepare command can be mutiline (a command statement by line), and support the following format token:
- version: the current phase version string
- major: the current phase version major part
- minor: the current phase version minor part
- patch: the current phase version patch part
- date: the current date (aka. the release date)
In the bump phase, version will be the bumped version whereas in the prepare phase it will be the prepared/next version.
_Exemple:_
[commands]
bump = echo "{major}.{minor} - {date:%Y-%m-%d)"
prepare = echo "Next version: {version}"