File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ interface InjectedExecOps {
1111 ExecOperations getExecOps ()
1212}
1313
14+ def isDryRun = (
15+ System . getenv(" DATADOG_SOURCEMAPS_DRY_RUN" )?. toBoolean() ?:
16+ (project. hasProperty(" datadogSourcemapsDryRun" ) && project. property(" datadogSourcemapsDryRun" ) == " true" )
17+ )
18+
1419afterEvaluate {
1520 def androidExtension = extensions. findByName(" android" )
1621
@@ -97,7 +102,13 @@ afterEvaluate {
97102 copyDebugId(packagerOutputSourceMapFile. absolutePath, jsOutputSourceMapFile. absolutePath, reactRoot)
98103 }
99104
100- runShellCommand(uploadSourcemap(jsBundleFile), reactRoot)
105+ def uploadCommand = uploadSourcemap(jsBundleFile);
106+ if (isDryRun) {
107+ logger. lifecycle(" Dry run mode enabled, not uploading sourcemaps to Datadog." )
108+ uploadCommand + = [" --dry-run" ]
109+ }
110+
111+ runShellCommand(uploadCommand, reactRoot)
101112 }
102113 }
103114
You can’t perform that action at this time.
0 commit comments