Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6cd4358

Browse files
feat: add expo sourcemap support
1 parent c393b59 commit 6cd4358

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.circleci/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,6 @@ workflows:
515515
- e2e_android
516516
- hold_generate_snapshot:
517517
type: approval
518-
requires: *release_dependencies
519518
- generate_snapshot:
520519
requires:
521520
- hold_generate_snapshot

android/sourcemaps.gradle

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Task createUploadSourcemapsTask(String flavor, String defaultVersionName, String
4848

4949
def tokenShellFile = new File(instabugDir, 'scripts/find-token.sh')
5050
def inferredToken = executeShellScript(tokenShellFile, jsProjectDir)
51+
5152
def appToken = resolveVar('App Token', 'INSTABUG_APP_TOKEN', inferredToken)
5253

5354
def versionName = resolveVar('Version Name', 'INSTABUG_VERSION_NAME', defaultVersionName)
@@ -174,9 +175,22 @@ static String executeShellScript(File script, File workingDir) {
174175
return null
175176
}
176177

178+
if (!script.canExecute()) {
179+
// Try to set executable permission
180+
script.setExecutable(true)
181+
}
182+
177183
def output = new StringBuffer()
184+
def error = new StringBuffer()
185+
186+
// Using 'sh' instead of './' to avoid needing exec permission, but keeping chmod above just in case
178187
def process = ['sh', script.getAbsolutePath()].execute(null, workingDir)
179-
process?.waitForProcessOutput(output, new StringBuffer())
188+
process?.waitForProcessOutput(output, error)
189+
190+
if (process.exitValue() != 0) {
191+
println "Error running script: ${error.toString().trim()}"
192+
return null
193+
}
180194

181-
return process?.exitValue() == 0 ? output.toString().trim() : null
195+
return output.toString().trim()
182196
}

0 commit comments

Comments
 (0)