From 367c36b4d5c2d57d98c9ec058854274517846bb3 Mon Sep 17 00:00:00 2001 From: cyan Date: Mon, 25 Nov 2024 17:00:37 +0100 Subject: [PATCH] fix sed (#1829) --- scripts/android/inject_app_details.sh | 12 ++++++------ scripts/universal_sed.sh | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/android/inject_app_details.sh b/scripts/android/inject_app_details.sh index 737ebbb88..9a8b12d9c 100755 --- a/scripts/android/inject_app_details.sh +++ b/scripts/android/inject_app_details.sh @@ -6,10 +6,10 @@ if [ -z "$APP_ANDROID_TYPE" ]; then fi cd ../.. -set -x -universal_sed "0,/version:/{s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/}" ./pubspec.yaml -universal_sed "0,/version:/{s/__APP_PACKAGE__/${APP_ANDROID_PACKAGE}/}" ./android/app/src/main/AndroidManifest.xml -universal_sed "0,/__APP_SCHEME__/s/__APP_SCHEME__/${APP_ANDROID_SCHEME}/" ./android/app/src/main/AndroidManifest.xml -universal_sed "0,/version:/{s/__versionCode__/${APP_ANDROID_BUILD_NUMBER}/}" ./android/app/src/main/AndroidManifest.xml -universal_sed "0,/version:/{s/__versionName__/${APP_ANDROID_VERSION}/}" ./android/app/src/main/AndroidManifest.xml +universal_sed "0,/version:/ {s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/;}" ./pubspec.yaml +universal_sed "0,/version:/ {s/__APP_PACKAGE__/${APP_ANDROID_PACKAGE}/;}" ./android/app/src/main/AndroidManifest.xml +universal_sed "0,/__APP_SCHEME__/ {s/__APP_SCHEME__/${APP_ANDROID_SCHEME}/;}" ./android/app/src/main/AndroidManifest.xml +universal_sed "0,/version:/ {s/__versionCode__/${APP_ANDROID_BUILD_NUMBER}/;}" ./android/app/src/main/AndroidManifest.xml +universal_sed "0,/version:/ {s/__versionName__/${APP_ANDROID_VERSION}/;}" ./android/app/src/main/AndroidManifest.xml + cd scripts/android diff --git a/scripts/universal_sed.sh b/scripts/universal_sed.sh index 8c0e3d9a4..d8a95684e 100644 --- a/scripts/universal_sed.sh +++ b/scripts/universal_sed.sh @@ -13,7 +13,6 @@ universal_sed() { local file=$2 if [[ "$SED_TYPE" == "GNU" ]]; then - pwd sed -i "$expression" "$file" else sed -i '' "$expression" "$file"