Skip to content

Commit

Permalink
chore(bash): fix up update script per shellcheck recs
Browse files Browse the repository at this point in the history
  • Loading branch information
gforsyth committed Oct 10, 2023
1 parent 6cd97e2 commit 48bdd5b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ VERSION=$1
echo "Updating substrait submodule..."
git submodule update --remote third_party/substrait

DIR=$(cd $(dirname $0) && pwd)
pushd "${DIR}"/third_party/substrait/
git checkout $VERSION
DIR=$(cd "$(dirname "$0")" && pwd)
pushd "${DIR}"/third_party/substrait/ || exit
git checkout "$VERSION"
SUBSTRAIT_HASH=$(git rev-parse --short HEAD)
popd
popd || exit

VERSION=$(echo $VERSION | sed 's/v//')
VERSION=${VERSION//v/}

sed -i "s#__substrait_hash__.*#__substrait_hash__ = \"$SUBSTRAIT_HASH\"#g" src/substrait/__init__.py
sed -i "s#__substrait_version__.*#__substrait_version__ = \"$VERSION\"#g" src/substrait/__init__.py
Expand Down

0 comments on commit 48bdd5b

Please sign in to comment.