From e4349b13b5f5f09d2088f64f364d99f5f3c3cc1e Mon Sep 17 00:00:00 2001 From: davidliu Date: Tue, 20 Aug 2024 14:21:53 +0900 Subject: [PATCH] Fix update gradle version script on linux --- scripts/update_android_gradle_version.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/update_android_gradle_version.sh b/scripts/update_android_gradle_version.sh index ec29ebb..97fc95f 100755 --- a/scripts/update_android_gradle_version.sh +++ b/scripts/update_android_gradle_version.sh @@ -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 \ No newline at end of file