From 6340c9af9251f9b65f61348df49249a657cbd741 Mon Sep 17 00:00:00 2001 From: crow Date: Mon, 9 Dec 2024 18:31:38 -0800 Subject: [PATCH] Fix update_proxy_version script --- scripts/update_proxy_version.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) mode change 100644 => 100755 scripts/update_proxy_version.sh diff --git a/scripts/update_proxy_version.sh b/scripts/update_proxy_version.sh old mode 100644 new mode 100755 index 5019c49..61140a5 --- a/scripts/update_proxy_version.sh +++ b/scripts/update_proxy_version.sh @@ -11,13 +11,10 @@ if [ -z "$PROXY_VERSION" ]; then fi # Update UaCapacitorAirship.podspec -sed -i.bak -E "s/(s\.dependency *\"AirshipFrameworkProxy\", *\")([^\"]*)(\")/\1$PROXY_VERSION\3/" "$ROOT_PATH/UaCapacitorAirship.podspec" +sed -i '' "s/s\.dependency.*AirshipFrameworkProxy.*$/s.dependency \"AirshipFrameworkProxy\", \"$PROXY_VERSION\"/" "$ROOT_PATH/UaCapacitorAirship.podspec" # Update android/build.gradle -sed -i.bak -E "s/(def proxyVersion = ')([^']*)(')/\1$PROXY_VERSION\3/" "$ROOT_PATH/android/build.gradle" +sed -i '' "s/def proxyVersion = '.*'/def proxyVersion = '$PROXY_VERSION'/" "$ROOT_PATH/android/build.gradle" # Update ios/Podfile -sed -i.bak -E "s/(pod 'AirshipFrameworkProxy', ')(.*?)(')/\1$PROXY_VERSION\3/" "$ROOT_PATH/ios/Podfile" - -# Clean up backup files -find "$ROOT_PATH" -name "*.bak" -delete +sed -i '' "s/pod 'AirshipFrameworkProxy'.*$/pod 'AirshipFrameworkProxy', '$PROXY_VERSION'/" "$ROOT_PATH/ios/Podfile"