Skip to content

Commit

Permalink
[MOB-12070] Disable Sorucemaps Scripts on CI (#940)
Browse files Browse the repository at this point in the history
The upload scripts used to run while running both Unit and E2E CI jobs,
resulting in more redundant time or unintended behavior.

These scripts were disabled by:
 1. Android: passing the `instabugUploadEnable` gradle property.
 2. iOS: setting the `INSTABUG_SOURCEMAPS_UPLOAD_DISABLE` environment variable.
  • Loading branch information
TheBuggedYRN authored Mar 12, 2023
1 parent 752b924 commit 06d364c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
command: yarn
- android/run-tests:
working-directory: ./example/android
test-command: ./gradlew test
test-command: ./gradlew test -PinstabugUploadEnable=false

validate_shell_files:
machine:
Expand Down Expand Up @@ -110,6 +110,7 @@ jobs:
working_directory: ~/project/example
environment:
FL_OUTPUT_DIR: output
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
steps:
- checkout:
path: ~/project
Expand Down Expand Up @@ -154,6 +155,7 @@ jobs:
working_directory: ~/project
environment:
FL_OUTPUT_DIR: output
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
steps:
- checkout
- run:
Expand Down
7 changes: 5 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ task upload_sourcemap(type: Exec) {
}

tasks.whenTaskAdded { task ->
if (task.name == 'preReleaseBuild' &&
(rootProject.hasProperty("instabugUploadEnable") ? rootProject.instabugUploadEnable : true)) {
def isEnabled = rootProject.hasProperty('instabugUploadEnable')
? new Boolean(rootProject.property('instabugUploadEnable'))
: true

if (task.name == 'preReleaseBuild' && isEnabled) {
task.dependsOn upload_sourcemap
}
}
2 changes: 1 addition & 1 deletion example/.detoxrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"android.emu.release": {
"binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
"build": "cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..",
"build": "cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release -PinstabugUploadEnable=false && cd ..",
"type": "android.emulator",
"name": "Nexus_6P_API_27"
}
Expand Down

0 comments on commit 06d364c

Please sign in to comment.