Permalink
Browse files

make releases easier

  • Loading branch information...
1 parent 1fea776 commit fa9b9f65637727c77f2153253b8362921ccfb9ac @tuxcanfly tuxcanfly committed Oct 14, 2013
Showing with 26 additions and 13 deletions.
  1. +24 −0 Makefile
  2. +2 −13 setup.py
View
@@ -0,0 +1,24 @@
+.PHONY: check-ver
+
+all: init test
+
+init:
+ pip install -e .
+ pip install -r example/requirements.txt
+
+test: init
+ python example/manage.py test billing
+
+release: check-ver
+ @echo ${VER}
+ sed -i "s/^VERSION = .*/VERSION = '${VER}'/g" setup.py
+ git add setup.py
+ git commit -m "version bump"
+ git tag v${VER}
+ git push --tags
+ python setup.py sdist upload
+
+check-ver:
+ifndef VER
+ $(error VER is undefined)
+endif
View
@@ -1,5 +1,4 @@
-VERSION = (0, 0, 9, "a", 0) # following PEP 386
-DEV_N = None
+VERSION = '0.0.9a'
import os
import sys
@@ -16,16 +15,6 @@ def read(fname):
standard_exclude_directories = ('.*', 'CVS', '_darcs', './build',
'./dist', 'EGG-INFO', '*.egg-info')
-def get_version():
- version = "%s.%s" % (VERSION[0], VERSION[1])
- if VERSION[2]:
- version = "%s.%s" % (version, VERSION[2])
- if VERSION[3] != "f":
- version = "%s%s%s" % (version, VERSION[3], VERSION[4])
- if DEV_N:
- version = "%s.dev%s" % (version, DEV_N)
- return version
-
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
# Note: you may want to copy this into your setup.py file verbatim, as
@@ -111,7 +100,7 @@ def find_package_data(
setup(
name="django-merchant",
- version=get_version(),
+ version=VERSION,
description="A Django app that provides helpers for multiple pluggable payment backends.",
long_description=read("README.rst"),
author="Agiliq Solutions",

0 comments on commit fa9b9f6

Please sign in to comment.