Skip to content

Commit

Permalink
Fix update_proxy_version script
Browse files Browse the repository at this point in the history
  • Loading branch information
crow committed Dec 10, 2024
1 parent b9255b4 commit 6340c9a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scripts/update_proxy_version.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 6340c9a

Please sign in to comment.