File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,17 @@ jobs:
2525 fixed_version_found=false
2626 plugin_version=$(echo "$BRANCH_NAME" | grep -Eo '[0-9].[0-9]+.[0-9]+')
2727 jira_fixed_version="React Native SDK v$plugin_version"
28- # echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV
2928 echo "JIRA_FIXED_VERSION=$jira_fixed_version" >> $GITHUB_ENV
3029 chmod +x .github/workflows/scripts/releaseNotesGenerator.sh
3130 .github/workflows/scripts/releaseNotesGenerator.sh $JIRA_TOKEN "$jira_fixed_version"
31+
32+ - name : Check version alignment between platforms
33+ env :
34+ BRANCH_NAME : ${{github.ref_name}}
35+ run : |
36+ plugin_version=$(echo "$BRANCH_NAME" | grep -Eo '[0-9].[0-9]+.[0-9]+')
37+ chmod +x .github/workflows/scripts/versionsAlignmentValidator.sh
38+ .github/workflows/scripts/versionsAlignmentValidator.sh "$plugin_version"
3239
3340 - name : Update package.json file
3441 run : |
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # Plugin version from release branch
4+ PLUGIN_VERSION=$1
5+
6+ # Gets the plugin version for platform_extension_v2 in every platform
7+ IOS_PLUGIN_VERSION=$( cat ios/RNAppsFlyer.h | grep ' kAppsFlyerPluginVersion' | grep -Eo ' [0-9].[0-9]+.[0-9]' )
8+ ANDROID_PLUGIN_VERSION=$( cat android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerConstants.java | grep ' PLUGIN_VERSION' | grep -Eo ' [0-9].[0-9]+.[0-9]' )
9+
10+ # Check if PLUGIN_VERSION, IOS_PLUGIN_VERSION and ANDROID_PLUGIN_VERSION are equal
11+ echo " version from branch: $PLUGIN_VERSION \nplatform_extension_v2 ios: $IOS_PLUGIN_VERSION \nplatform_extension_v2 android: $ANDROID_PLUGIN_VERSION "
12+ if [[ " $PLUGIN_VERSION " == " $IOS_PLUGIN_VERSION " && " $PLUGIN_VERSION " == " $ANDROID_PLUGIN_VERSION " ]]; then
13+ echo " platform_extension_v2 version is aligned"
14+ else
15+ echo " platform_extension_v2 version is different!"
16+ exit 1
17+ fi
You can’t perform that action at this time.
0 commit comments