#!/bin/sh
cd "${0%/*}"
cat setup.py | sed -e "s/version='[0123456789]\+\.[0123456789]\+\.[01234567989]\+'/version='$( git rev-parse --abbrev-ref HEAD | cut -d / -f 2 )'/" > setup.py

#!/bin/sh
cd "${0%/*}"
cat setup.py | sed -e "s/version='[0123456789]\{1,\}\.[0123456789]\{1,\}\.[01234567989]\{1,\}'/version='$( git rev-parse --abbrev-ref HEAD | cut -d / -f 2 )'/" > setup.py

Allow for XX.YYY.ZZZZ version numbers, not just X.Y.Z
Allow for XX.YYY.ZZZZ version numbers, not just X.Y.Z
