From 683b1d07c997ceb0db3e9fc80fc787b3a125ba42 Mon Sep 17 00:00:00 2001 From: Marvin Pinto Date: Wed, 23 Sep 2015 21:33:02 -0400 Subject: [PATCH] Setup and use 'bumpversion' to manage release numbering + tagging There is no need for anyone to do this manually! --- Makefile | 10 ++++++++++ requirements-dev.txt | 1 + setup.cfg | 6 ++++++ setup.py | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 setup.cfg diff --git a/Makefile b/Makefile index 19657cb..5da7959 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,13 @@ help: @echo 'checkstyle: Run flake8' @echo 'run: Run CharlesBOT locally' +# Utility target for checking required parameters +guard-%: + @if [ "$($*)" = '' ]; then \ + echo "Missing required $* variable."; \ + exit 1; \ + fi; + clean: py3clean . rm -f .coverage @@ -41,3 +48,6 @@ test: install run: PYTHONWARNINGS=default PYTHONASYNCIODEBUG=1 $(ENV)/bin/charlesbot + +release: guard-PART + $(ENV)/bin/bumpversion $(PART) diff --git a/requirements-dev.txt b/requirements-dev.txt index c1a6822..4423062 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,7 @@ -r requirements.txt asynctest==0.4.0 +bumpversion==0.5.3 coverage==3.7.1 flake8==2.4.1 mccabe==0.3.1 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..f3e8018 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,6 @@ +[bumpversion] +current_version = 0.4.0 +commit = True +tag = True + +[bumpversion:file:setup.py] diff --git a/setup.py b/setup.py index eed6024..decad86 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='charlesbot', - version='0.4', + version='0.4.0', description='Slack Real Time Messaging robot written in Python 3!', long_description=long_description, author='Marvin Pinto',