Merge branch 'master' into dev

This commit is contained in:
Paulus Schoutsen 2018-06-22 13:40:53 -04:00
commit ee31f89049

View File

@ -2,6 +2,7 @@
"""Helper script to bump the current version."""
import argparse
import re
import subprocess
from packaging.version import Version
@ -117,12 +118,21 @@ def main():
help="The type of the bump the version to.",
choices=['beta', 'dev', 'patch', 'minor'],
)
parser.add_argument(
'--commit', action='store_true',
help='Create a version bump commit.')
arguments = parser.parse_args()
current = Version(const.__version__)
bumped = bump_version(current, arguments.type)
assert bumped > current, 'BUG! New version is not newer than old version'
write_version(bumped)
if not arguments.commit:
return
subprocess.run([
'git', 'commit', '-am', 'Bumped version to {}'.format(bumped)])
def test_bump_version():
"""Make sure it all works."""