diff --git a/scripts/bumpversion.sh b/scripts/bumpversion.sh index 7ee2b92..8b7e2b0 100755 --- a/scripts/bumpversion.sh +++ b/scripts/bumpversion.sh @@ -25,10 +25,10 @@ VERSION=$($DIR/get_version.sh) echo "Bumping the version from $VERSION to $1" # __init__.py -sed -i "s|__version__ = '$VERSION'|__version__ = '$1'|g" $DIR/../$PACKAGE/__init__.py +sed -i "s|__version__ = \"$VERSION\"|__version__ = \"$1\"|g" $DIR/../$PACKAGE/__init__.py # setup.py -sed -i "s|version='$VERSION',|version='$1',|g" $DIR/../setup.py +sed -i "s|version=\"$VERSION\",|version=\"$1\",|g" $DIR/../setup.py # conf.py sed -i "s|version = '$VERSION'|version = '$1'|g" $DIR/../docs/source/conf.py diff --git a/scripts/get_package_name.sh b/scripts/get_package_name.sh index b81914c..ea21383 100755 --- a/scripts/get_package_name.sh +++ b/scripts/get_package_name.sh @@ -5,11 +5,11 @@ set -e # get the directory of this script DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -RSTRIP="'*" -LSTRIP="*'" +RSTRIP='"*' +LSTRIP='*"' # get the package name -PACKAGE_LINE=$(grep 'name=' $DIR/../setup.py || echo '') +PACKAGE_LINE=$(grep "name=" $DIR/../setup.py || echo '') PACKAGE_TEMP=${PACKAGE_LINE%$RSTRIP} PACKAGE=${PACKAGE_TEMP##$LSTRIP} diff --git a/scripts/get_version.sh b/scripts/get_version.sh index b17f960..113c8eb 100755 --- a/scripts/get_version.sh +++ b/scripts/get_version.sh @@ -5,15 +5,15 @@ set -e # get the directory of this script DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -RSTRIP="'*" -LSTRIP="*'" +RSTRIP='"*' +LSTRIP='*"' # get the package name PACKAGE=$($DIR/get_package_name.sh) # get the current version -VERSION_LINE=$(grep '__version__' "$DIR/../$PACKAGE/__init__.py" || echo '') -VERSION_TEMP=${VERSION_LINE%"'"} +VERSION_LINE=$(grep "__version__" "$DIR/../$PACKAGE/__init__.py" || echo '') +VERSION_TEMP=${VERSION_LINE%'"'} VERSION=${VERSION_TEMP##$LSTRIP} diff --git a/scripts/git_tag.sh b/scripts/git_tag.sh index c8c8d56..d79e29e 100755 --- a/scripts/git_tag.sh +++ b/scripts/git_tag.sh @@ -3,9 +3,6 @@ # get the directory of this script DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -# get the package name -PACKAGE=$($DIR/get_package_name.sh) - # get the current version VERSION=$($DIR/get_version.sh)