Skip to content

Commit ea6c292

Browse files
TheBuggedYRNHeshamMegid
authored andcommitted
[MOB-12070] Disable Sorucemaps Scripts on CI (#940)
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.
1 parent 11424e2 commit ea6c292

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
command: yarn
7474
- android/run-tests:
7575
working-directory: ./example/android
76-
test-command: ./gradlew test
76+
test-command: ./gradlew test -PinstabugUploadEnable=false
7777

7878
validate_shell_files:
7979
machine:
@@ -110,6 +110,7 @@ jobs:
110110
working_directory: ~/project/example
111111
environment:
112112
FL_OUTPUT_DIR: output
113+
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
113114
steps:
114115
- checkout:
115116
path: ~/project
@@ -154,6 +155,7 @@ jobs:
154155
working_directory: ~/project
155156
environment:
156157
FL_OUTPUT_DIR: output
158+
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
157159
steps:
158160
- checkout
159161
- run:

android/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ task upload_sourcemap(type: Exec) {
5353
}
5454

5555
tasks.whenTaskAdded { task ->
56-
if (task.name == 'preReleaseBuild' &&
57-
(rootProject.hasProperty("instabugUploadEnable") ? rootProject.instabugUploadEnable : true)) {
56+
def isEnabled = rootProject.hasProperty('instabugUploadEnable')
57+
? new Boolean(rootProject.property('instabugUploadEnable'))
58+
: true
59+
60+
if (task.name == 'preReleaseBuild' && isEnabled) {
5861
task.dependsOn upload_sourcemap
5962
}
6063
}

example/.detoxrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"android.emu.release": {
2424
"binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
25-
"build": "cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..",
25+
"build": "cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release -PinstabugUploadEnable=false && cd ..",
2626
"type": "android.emulator",
2727
"name": "Nexus_6P_API_27"
2828
}

0 commit comments

Comments
 (0)