File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -82,12 +82,15 @@ jobs:
8282 - name : Setup Git User
8383 uses : OneSignal/sdk-actions/.github/actions/setup-git-user@main
8484
85- - name : Get current native SDK versions
85+ - name : Get current native SDK versions from target branch
8686 id : current_versions
8787 run : |
88- CURRENT_VERSION=$(cat OneSignalExample/Assets/OneSignal/VERSION | tr -d '\n\r' | xargs)
89- ANDROID_VERSION=$(grep -oE 'spec="com.onesignal:OneSignal:[0-9]+\.[0-9]+\.[0-9]+"' com.onesignal.unity.android/Editor/OneSignalAndroidDependencies.xml | sed -E 's/.*OneSignal:([0-9]+\.[0-9]+\.[0-9]+)".*/\1/' | head -1)
90- IOS_VERSION=$(grep -oE 'version="[0-9.]+"' com.onesignal.unity.ios/Editor/OneSignaliOSDependencies.xml | grep -oE '[0-9.]+' | head -1)
88+ git fetch origin ${{ inputs.target_branch }}
89+
90+ # Get versions from target branch (not the release branch)
91+ CURRENT_VERSION=$(git show origin/${{ inputs.target_branch }}:OneSignalExample/Assets/OneSignal/VERSION | tr -d '\n\r' | xargs)
92+ ANDROID_VERSION=$(git show origin/${{ inputs.target_branch }}:com.onesignal.unity.android/Editor/OneSignalAndroidDependencies.xml | grep -oE 'spec="com.onesignal:OneSignal:[0-9]+\.[0-9]+\.[0-9]+"' | sed -E 's/.*OneSignal:([0-9]+\.[0-9]+\.[0-9]+)".*/\1/' | head -1)
93+ IOS_VERSION=$(git show origin/${{ inputs.target_branch }}:com.onesignal.unity.ios/Editor/OneSignaliOSDependencies.xml | grep -oE 'version="[0-9.]+"' | grep -oE '[0-9.]+' | head -1)
9194 echo "unity_from=${CURRENT_VERSION}" >> $GITHUB_OUTPUT
9295 echo "android_from=${ANDROID_VERSION}" >> $GITHUB_OUTPUT
9396 echo "ios_from=${IOS_VERSION}" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments