Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoud-elmorabea committed Oct 24, 2024
1 parent 1a2ca2f commit 1ce1a75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/build-sample-app-for-sdk-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: MBL-553-build-sample-app-for-sdk-release
fetch-depth: 0 # fetches all history for all tags and branches
fetch-depth: 0 # Workaround for bug https://github.com/actions/checkout/issues/1471

- name: Get latest SDK version
id: latest-sdk-version-step
Expand All @@ -22,17 +22,12 @@ jobs:
- uses: ./.github/actions/setup-android

# CLI to replace strings in files. The CLI recommends using `cargo install` which is slow. This Action is fast because it downloads pre-built binaries.
# If using sd on macos, "brew install" works great. for Linux, this is the recommended way.
- name: Install sd CLI to use later in the workflow
# uses: kenji-miyake/setup-sd@v1
uses: levibostian/setup-sd@add-file-extension # Using fork until upstream Action has bug fixed in it.

- name: Install tools from Gemfile (ruby language) used for building our apps with
- name: Install Ruby used by Fastlane
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true # cache tools to make builds faster in future
bundler-cache: true

- name: Setup local.properties file for sample app
env:
SDK_VERSION: ${{ steps.latest-sdk-version-step.outputs.LATEST_TAG }}
Expand All @@ -42,9 +37,6 @@ jobs:
echo "siteId=${{ secrets.CUSTOMERIO_JAVA_WORKSPACE_SITE_ID }}" >> "samples/local.properties"
echo "sdkVersion=${{ env.SDK_VERSION }}" >> "samples/local.properties"
- name: Dump GitHub Action metadata because Fastlane uses it. Viewing it here helps debug JSON parsing code in Firebase.
run: cat $GITHUB_EVENT_PATH

- name: Deploy development build via Fastlane
uses: maierj/[email protected]
with:
Expand Down
4 changes: 1 addition & 3 deletions samples/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ platform :android do
test_groups = 'public'
app_package_name = 'io.customer.android.sample.java_layout'

# Modify the source code with the new app version and build number before we compile the Android app. This is a good idea to do to make installing builds on a test device easier.
# The Android OS might give errors when trying to install a build of an app if the app is already installed on the device. Having unique build number or app version can avoid those errors.
android_set_version_name(
version_name: new_app_version,
gradle_file: path_to_app_gradle_file
Expand All @@ -83,7 +81,7 @@ platform :android do
build_android_app(
task: ":samples:java_layout:assemble",
build_type: 'Release',
gradle_path: '../../gradlew' # path to root directory of the SDK. Where gradlew is located
gradle_path: '../../gradlew'
)

# function 'setup_google_bucket_access' is a re-usable function inside of apple-code-signing Fastfile that we imported.
Expand Down

0 comments on commit 1ce1a75

Please sign in to comment.