Skip to content

Commit 8854870

Browse files
committed
export sdk version
1 parent 8c673f0 commit 8854870

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/reusable_build_sample_apps.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,14 @@ jobs:
151151
ANDROID_SIGNING_STORE_PASSWORD: ${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }}
152152
FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64: ${{ secrets.FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64 }}
153153

154+
- name: Determine SDK Version
155+
id: determine-sdk-version
156+
run: |
157+
sdk_version="${{ env.SDK_VERSION || steps.latest-sdk-version-step.outputs.LATEST_TAG }}"
158+
159+
echo "Final SDK Version: $sdk_version"
160+
echo "SDK_VERSION=$sdk_version" >> $GITHUB_ENV
161+
154162
- name: Send Slack Notification for Sample App Builds
155163
if: env.IS_PRIMARY_APP == 'true'
156164
uses: customerio/mobile-ci-tools/github-actions/slack-notify-sample-app/v1@mbl-750-app-slack-notify

samples/fastlane/Fastfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ private_lane :build_sample_app do |options|
3232

3333
if !options.key?(:sdk_version)
3434
UI.important("Updating the SDK's source code version to non-production version. This allows the sample apps to show the SDK version at runtime for app user to better understand the version of the SDK they are running.")
35-
sh("../../../scripts/update-version.sh \"#{new_app_version}.#{new_build_number}\"")
35+
new_sdk_version = "#{new_app_version}.#{new_build_number}"
36+
sh("../../../scripts/update-version.sh \"#{new_sdk_version}\"")
37+
sh("echo 'SDK_VERSION=#{new_sdk_version}' >> $GITHUB_ENV")
3638
end
3739

3840
build_android_app(

0 commit comments

Comments
 (0)