Skip to content

Commit 4df518d

Browse files
authored
Update scripts (#343)
1 parent a06ac98 commit 4df518d

3 files changed

Lines changed: 7 additions & 10 deletions

File tree

scripts/get_package_name.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ set -e
55
# get the directory of this script
66
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
77

8-
RSTRIP="\"*"
9-
LSTRIP="*\""
8+
RSTRIP='"*'
9+
LSTRIP='*"'
1010

1111
# get the package name
12-
PACKAGE_LINE=$(grep 'name=' $DIR/../setup.py || echo '')
12+
PACKAGE_LINE=$(grep "name=" $DIR/../setup.py || echo '')
1313
PACKAGE_TEMP=${PACKAGE_LINE%$RSTRIP}
1414
PACKAGE=${PACKAGE_TEMP##$LSTRIP}
1515

scripts/get_version.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ set -e
55
# get the directory of this script
66
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
77

8-
RSTRIP="\"*"
9-
LSTRIP="*\""
8+
RSTRIP='"*'
9+
LSTRIP='*"'
1010

1111
# get the package name
1212
PACKAGE=$($DIR/get_package_name.sh)
1313

1414
# get the current version
15-
VERSION_LINE=$(grep '__version__' "$DIR/../$PACKAGE/__init__.py" || echo '')
16-
VERSION_TEMP=${VERSION_LINE%"\""}
15+
VERSION_LINE=$(grep "__version__" "$DIR/../$PACKAGE/__init__.py" || echo '')
16+
VERSION_TEMP=${VERSION_LINE%'"'}
1717

1818
VERSION=${VERSION_TEMP##$LSTRIP}
1919

scripts/git_tag.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# get the directory of this script
44
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
55

6-
# get the package name
7-
PACKAGE=$($DIR/get_package_name.sh)
8-
96
# get the current version
107
VERSION=$($DIR/get_version.sh)
118

0 commit comments

Comments
 (0)