diff --git a/bread/__init__.py b/bread/__init__.py index eaf5a60..b46dcd4 100644 --- a/bread/__init__.py +++ b/bread/__init__.py @@ -11,7 +11,7 @@ from .lifecycle import * __title__ = 'bread' -__version__ = '3.0.1' +__version__ = '3.0.2' __author__ = 'Alex Rasmussen' __license__ = 'MIT' __copyright__ = 'Copyright 2015 Alex Rasmussen' diff --git a/bread/enum.py b/bread/enum.py index 69158d2..22bf3bb 100644 --- a/bread/enum.py +++ b/bread/enum.py @@ -12,7 +12,7 @@ def make_enum_field(parent, **field_options): def encode_enum(key): if key not in keys: - raise ValueError('%s is not a valid enum value' % (key)) + raise ValueError('%s is not a valid enum value; valid values %s' % (key, keys)) return old_encode_fn(keys[key]) @@ -24,7 +24,7 @@ def decode_enum(encoded): return default else: raise ValueError( - '%d is not a valid enum value' % (decoded_value)) + '%d is not a valid enum value; valid values %s' % (decoded_value, values)) return values[decoded_value] diff --git a/change_version.sh b/change_version.sh index 06fbc49..82d90f8 100755 --- a/change_version.sh +++ b/change_version.sh @@ -6,6 +6,15 @@ if [ "$#" -ne 1 ]; then exit 2 fi +if [[ ${version} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] +then + echo "Version format is valid" +else + echo "Version format invalid; must be of the form 'MAJOR.MINOR.PATCH'" + exit 1 +fi + + # Set version and build to version sed -i .bak -e "s/version = '.*'/version = '${version}'/g" docs/source/conf.py sed -i .bak -e "s/release = '.*'/release = '${version}'/g" docs/source/conf.py @@ -19,4 +28,3 @@ find . -name "*.bak" -exec rm {} \; # Tag revision as this version in git git commit -a -m "Bumping version to ${git_tag}" -git tag ${git_tag} diff --git a/docs/source/conf.py b/docs/source/conf.py index 778ee9d..3f83fdb 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '3.0.1' +version = '3.0.2' # The full version, including alpha/beta/rc tags. -release = '3.0.1' +release = '3.0.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index c5232ea..f0172be 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name='bread', - version='3.0.1', + version='3.0.2', description='Binary format parsing made easier', url='https://github.com/alexras/bread', author='Alex Rasmussen',