This commit is contained in:
Shupeyko Nikita 2017-05-23 12:53:24 +00:00 committed by GitHub
commit ae4a4e5225
4 changed files with 29 additions and 3 deletions

View File

@ -6,6 +6,7 @@
"description": "A short description of the project.",
"domain_name": "example.com",
"version": "0.1.0",
"use_bumpversion": "y",
"timezone": "UTC",
"use_whitenoise": "y",
"use_celery": "n",

View File

@ -0,0 +1,22 @@
[bumpversion]
current_version = {{ cookiecutter.version }}
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<pre>\d+)\.(?P<prenum>\d+))?
serialize =
{major}.{minor}.{patch}-{pre}.{prenum}
{major}.{minor}.{patch}
commit = True
tag = True
tag_name = {new_version}
[bumpversion:file:./package.json]
search = "version": "{current_version}"
replace = "version": "{new_version}"
[bumpversion:file:./{{cookiecutter.project_slug}}/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
[bumpversion:file:./docs/conf.py]
search = release = '{current_version}'
replace = release = '{new_version}'

View File

@ -46,10 +46,10 @@ copyright = """{% now 'utc', '%Y' %}, {{ cookiecutter.author_name }}"""
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.1'
# The full version, including alpha/beta/rc tags.
release = '0.1'
release = '{{ cookiecutter.version }}'
# The short X.Y version.
version = '.'.join(release.split('.')[:2])
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -17,3 +17,6 @@ ipdb==0.10.3
pytest-django==3.1.2
pytest-sugar==0.8.0
{% if cookiecutter.use_bumpversion == 'y' -%}
bumpversion==0.5.3
{%- endif %}