You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/create-release-pr.yml
+22-5Lines changed: 22 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -92,8 +92,18 @@ jobs:
92
92
93
93
# Get versions from target branch (not the release branch)
94
94
CURRENT_VERSION=$(git show origin/${{ inputs.target_branch }}:package.json | jq -r .version)
95
-
ANDROID_VERSION=$(git show origin/${{ inputs.target_branch }}:android/build.gradle | grep "com.onesignal:OneSignal:" | sed -E "s/.*OneSignal:([^\"']+).*/\1/")
96
-
IOS_VERSION=$(git show origin/${{ inputs.target_branch }}:react-native-onesignal.podspec | grep "OneSignalXCFramework" | sed -E "s/.*'([^']+)'.*/\1/")
95
+
ANDROID_VERSION=$(git show origin/${{ inputs.target_branch }}:android/build.gradle | sed -nE "s/.*def oneSignalVersion = ['\"]([^'\"]+)['\"].*/\1/p" | head -n 1)
96
+
IOS_VERSION=$(git show origin/${{ inputs.target_branch }}:react-native-onesignal.podspec | sed -nE "s/.*onesignal_xcframework_version = ['\"]([^'\"]+)['\"].*/\1/p" | head -n 1)
97
+
98
+
if [ -z "$ANDROID_VERSION" ]; then
99
+
echo "::error::Failed to read Android SDK version from android/build.gradle"
100
+
exit 1
101
+
fi
102
+
103
+
if [ -z "$IOS_VERSION" ]; then
104
+
echo "::error::Failed to read iOS SDK version from react-native-onesignal.podspec"
0 commit comments