Skip to content

Commit

Permalink
Fix update gradle version script on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
davidliu committed Aug 20, 2024
1 parent 5974bfd commit e4349b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/update_android_gradle_version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
PACKAGE_VERSION=$(cat ./package.json | jq -r '.version')
echo "updating gradle version name to $PACKAGE_VERSION"
# sed command works only on linux based systems as macOS version expects a backup file passed additionally
sed -i '' -e "/VERSION_NAME=/ s/=.*/=$PACKAGE_VERSION/" ./gradle.properties
if [ "$(uname)" == "Darwin" ]; then
sed -i '' -e "/VERSION_NAME=/ s/=.*/=$PACKAGE_VERSION/" ./gradle.properties
else
sed -i -e "/VERSION_NAME=/ s/=.*/=$PACKAGE_VERSION/" ./gradle.properties
fi

0 comments on commit e4349b1

Please sign in to comment.