Skip to content

Commit

Permalink
Update scripts (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffLIrion committed Oct 20, 2023
1 parent a06ac98 commit 4df518d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions scripts/get_package_name.sh
Expand Up @@ -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}

Expand Down
8 changes: 4 additions & 4 deletions scripts/get_version.sh
Expand Up @@ -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}

Expand Down
3 changes: 0 additions & 3 deletions scripts/git_tag.sh
Expand Up @@ -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)

Expand Down

0 comments on commit 4df518d

Please sign in to comment.