Skip to content

Commit

Permalink
* Remove bootstrap.sh file if Vagrant support has been disabled
Browse files Browse the repository at this point in the history
* Make bumpversion optional within the setup.cfg
  • Loading branch information
hkage committed May 12, 2017
1 parent 0bb6c83 commit 5bea10a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,8 @@ Development
* Made copyright for the Sphix documentation variable
* Remove all Docker related files
* Refactored some tests
* Make bumpversion optional within the setup.cfg
* Remove bootstrap.sh if Vagrant support has been disabled

0.2.1 (2017-03-15)
---
Expand Down
4 changes: 3 additions & 1 deletion hooks/post_gen_project.py
Expand Up @@ -9,6 +9,7 @@

PROJECT_DIRECTORY = os.path.realpath(os.path.curdir)
DOCKER_FILES = ('Dockerfile', '.dockerignore', 'docker-compose.yml')
VAGRANT_FILES = ('Vagrantfile', 'bootstrap.sh')


def generate_random_string(length=25,
Expand Down Expand Up @@ -55,7 +56,8 @@ def set_cookie_secret(project_directory):
remove_file(filename)

if '{{ cookiecutter.use_vagrant }}'.lower() in ('n', 'no'):
remove_file('Vagrantfile')
for filename in VAGRANT_FILES:
remove_file(filename)

if '{{ cookiecutter.use_bumpversion }}'.lower() in ('n', 'no'):
remove_file('.bumpversion.cfg')
Expand Down
4 changes: 2 additions & 2 deletions {{cookiecutter.project_slug}}/setup.cfg
@@ -1,7 +1,7 @@
[aliases]
release = sdist
test = pytest

{% if cookiecutter.use_bumpversion == 'y' -%}
[bumpversion]
current_version = {{ cookiecutter.version }}
commit = True
Expand All @@ -13,7 +13,7 @@ replace = version = '{new_version}'

[bumpversion:file:{{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/version.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
replace = __version__ = '{new_version}'{%- endif %}

[flake8]
exclude = docs
Expand Down

0 comments on commit 5bea10a

Please sign in to comment.