Rever: Releaser of Versions!¶
Rever is a xonsh-powered, cross-platform software release tool. The goal of rever is to provide sofware projects a standard mechanism for dealing with code releases. Rever aims to make the process of releasing a new version of a code base as easy as running a single command. Rever…
has a number of stock tools and utilities that you can mix and match to meet your projects needs,
is easily extensible, allowing your project to execute custom release activities, and
allows you to undo release activities, in the event of a mistake!
There are a couple steps you should take to get the most out of rever.
Install rever. Rever is on conda-forge so install via
conda install rever -c conda-forge, via pypi with
pip install re-ver, or from source.
rever.xshfile in the root directory of your source repository. Here is a simplified example from
$PROJECT = 'rever' $ACTIVITIES = [ 'version_bump', # Changes the version number in various source files (setup.py, __init__.py, etc) 'changelog', # Uses files in the news folder to create a changelog for release 'tag', # Creates a tag for the new version number 'push_tag', # Pushes the tag up to the $TAG_REMOTE 'pypi', # Sends the package to pypi 'conda_forge', # Creates a PR into your package's feedstock 'ghrelease' # Creates a Github release entry for the new tag ] $VERSION_BUMP_PATTERNS = [ # These note where/how to find the version numbers ('rever/__init__.py', r'__version__\s*=.*', "__version__ = '$VERSION'"), ('setup.py', r'version\s*=.*,', "version='$VERSION',") ] $CHANGELOG_FILENAME = 'CHANGELOG.rst' # Filename for the changelog $CHANGELOG_TEMPLATE = 'TEMPLATE.rst' # Filename for the news template $PUSH_TAG_REMOTE = 'firstname.lastname@example.org:regro/rever.git' # Repo to push tags to $GITHUB_ORG = 'regro' # Github org for Github releases and conda-forge $GITHUB_REPO = 'rever' # Github repo for Github releases and conda-forge
After setting up the
rever setupin the root directory of your source repository. This will setup files and other things needed for rever to operate.
It is always a good idea to check that you have permissions and the proper libraries installed, so it is best to run
rever checkbefore every release.
When you are ready to release run
rever <new_version_number>and rever will take care of the rest.
Rever currently has the following external dependencies,
We highly encourage contributions to rever! If you would like to contribute, it is as easy as forking the repository on GitHub, making your changes, and issuing a pull request. If you have any questions about this process don’t hesitate to ask on the Gitter channel.
See the Developer’s Guide for more information about contributing.