Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup bumpversion #440

Merged
merged 1 commit into from Apr 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions .bumpversion.cfg
@@ -0,0 +1,7 @@
[bumpversion]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can move this into setup.cfg if we'd like but the same issues with the tox.ini and pytest.ini files being rolled into there apply as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with keeping it like this

current_version = 2.0.0.dev0
commit = True
tag = True

[bumpversion:file:setup.py]
[bumpversion:file:flaskbb/__init__.py]
1 change: 1 addition & 0 deletions requirements-dev.txt
Expand Up @@ -8,3 +8,4 @@ Sphinx
alabaster
flake8
tox==2.9.0
bumpversion==0.5.3
10 changes: 1 addition & 9 deletions setup.py
Expand Up @@ -64,14 +64,6 @@ def read(*parts):
return fp.read()


def find_version(*file_paths):
version_match = re.search(r'__version__\s+=\s+(.*)',
read(*file_paths)).group(1)
if version_match:
return str(ast.literal_eval(version_match))
raise RuntimeError("Unable to find version string.")


def get_requirements(e=None):
rf = "requirements.txt" if e is None else 'requirements-{}.txt'.format(e)
r = read(rf)
Expand All @@ -84,7 +76,7 @@ def get_requirements(e=None):

setup(
name='FlaskBB',
version=find_version("flaskbb", "__init__.py"),
version="2.0.0.dev0",
url='https://github.com/sh4nks/flaskbb/',
license='BSD',
author='Peter Justin',
Expand Down