Skip to content

Commit

Permalink
update readme script
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-kremer93 committed Mar 7, 2024
1 parent 2111f49 commit fb745e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/pre-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,9 @@ jobs:
git push origin HEAD:${{ env.GIT_BRANCH_RELEASE }} --force
- name: Update README.md
env:
JIRA_TOKEN: ${{ secrets.CI_JIRA_TOKEN }}
JIRA_FIXED_VERSION: "React Native SDK v${{env.PLUGIN_VERSION}}"
run: |
ios_sdk_version=$(cat react-native-appsflyer.podspec | grep '\'AppsFlyerFramework\' | grep -Eo '[0-9].[0-9]+.[0-9]+')
android_sdk_version=$(cat android/build.gradle | grep 'com.appsflyer:af-android-sdk' | grep -Eo '[0-9].[0-9]+.[0-9]+')
sed -i -e -r "s/Android AppsFlyer SDK \*\*v[0-9].[0-9]+.[0-9]+\*\*/Android AppsFlyer SDK \*\*v$android_sdk_version\*\*/g" README.md
sed -i -e -r "s/iOS AppsFlyer SDK \*\*v[0-9].[0-9]+.[0-9]+\*\*/iOS AppsFlyer SDK \*\*v$ios_sdk_version\*\*/g" README.md
chmod +x .github/workflows/scripts/updateReadme.sh
.github/workflows/scripts/updateReadme.sh
git add README.md
git commit -m "Update README.md"
git push origin HEAD:${{ env.GIT_BRANCH_RELEASE }} --force
6 changes: 6 additions & 0 deletions .github/workflows/scripts/updateReadme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

ios_sdk_version=$(cat react-native-appsflyer.podspec | grep '\'AppsFlyerFramework\' | grep -Eo '[0-9].[0-9]+.[0-9]+')
android_sdk_version=$(cat android/build.gradle | grep 'com.appsflyer:af-android-sdk' | grep -Eo '[0-9].[0-9]+.[0-9]+')
sed -i -e -r "s/Android AppsFlyer SDK \*\*v[0-9].[0-9]+.[0-9]+\*\*/Android AppsFlyer SDK \*\*v$android_sdk_version\*\*/g" README.md
sed -i -e -r "s/iOS AppsFlyer SDK \*\*v[0-9].[0-9]+.[0-9]+\*\*/iOS AppsFlyer SDK \*\*v$ios_sdk_version\*\*/g" README.md

0 comments on commit fb745e9

Please sign in to comment.