From f32d325afd36476cb3d877563ba4e8acc3603bd1 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Tue, 8 Mar 2016 21:59:50 +0200
Subject: [PATCH] - Added Tox release environment. - Manage versions via the
 VERSION file. - Bump version to 0.2.1.

---
 MANIFEST.in |  4 +++-
 VERSION     |  1 +
 setup.py    |  2 +-
 tox.ini     | 12 ++++++++++++
 4 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 VERSION

diff --git a/MANIFEST.in b/MANIFEST.in
index 4c67c7f..ad1d2d2 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,4 @@
-recursive-include eb-prune
+recursive-include eb-prune *.py
 exclude .pre-commit-config.yaml
+include README.rst
+include VERSION
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..7dff5b8
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+0.2.1
\ No newline at end of file
diff --git a/setup.py b/setup.py
index fcbd992..1be51cc 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
 
 setup(
     name='eb-prune',
-    version='0.2.0',
+    version=open('VERSION', 'r').read(),
     description='Pruning of Elastic Beanstalk versions.',
     long_description=open('README.rst', 'r').read(),
     url='https://www.shore.co.il/git/eb-prune',
diff --git a/tox.ini b/tox.ini
index 221ee94..c405c98 100644
--- a/tox.ini
+++ b/tox.ini
@@ -13,3 +13,15 @@ commands =
     check-manifest --ignore tox.ini,tests*
     python setup.py check -m -r -s
     flake8 .
+
+[testenv:release]
+basepython = python
+whitelist_externals =
+    sh
+deps =
+    twine
+    wheel
+commands =
+    sh -c 'git tag -f "$(cat VERSION)"'
+    python setup.py bdist_wheel
+#   twine upload --skip-existing dist/*.whl
-- 
GitLab