Skip to content

Commit 0b0e1da

Browse files
author
Alexis Pierru
committed
Update action.yml, recompile main.js
1 parent e1eb970 commit 0b0e1da

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

action.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,19 @@ inputs:
99
UPLOAD_BINARY_PATH:
1010
description: >
1111
Path to the app to upload.
12-
12+
1313
You can use a glob pattern to indicate variable parts of the build's file name (for example, if the app's version number or build date is in the file name).
1414
Examples of glob patterns:
1515
- `app-*.apk` : search for any apk starting with `app-` in workspace root directory
1616
- `**/app-*.ipa` : search for any ipa starting with `app-` in any subdirectory of the workspace
1717
- `{,**/}app-debug*.*` : search for any file containing `app-debug` in root the directory or in any subdirectory of the workspace
18-
18+
1919
If multiple files match the provided pattern all matching files will be uploaded. The pattern should not match more than 3 files.
2020
required: true
21+
SOURCEMAP_FILE_PATH:
22+
description: >
23+
Path to the sourcemap file used to map obfuscated symbols to their original code name
24+
required: false
2125
USERNAME:
2226
description: >
2327
Username to be used for authenticated testing of the application. If provided, will override the previosly provided value.
@@ -32,22 +36,22 @@ inputs:
3236
required: false
3337
RELEASE_ID:
3438
description: >
35-
A custom ID associated with the binary being submitted, since the app version may not change very often.
39+
A custom ID associated with the binary being submitted, since the app version may not change very often.
3640
It is recommended that you use a unique value for this, such as the CI/CD job ID.
3741
If not set, Data Theorem will assign the binary a release_id.
3842
required: false
3943
PLATFORM_VARIANT:
4044
description: >
41-
The variant of the platform to use for scanning; Currently, the accepted value is
45+
The variant of the platform to use for scanning; Currently, the accepted value is
4246
IOS_ON_MAC (scan an iOS build on an Apple Silicon Mac instead of on an iOS device, in order to exercise code paths that are specific to Macs.)
4347
required: false
4448
EXTERNAL_ID:
4549
description: >
4650
The external_id field represents your organization’s custom identifier for the app, if any.
47-
required: false
51+
required: false
4852
runs:
4953
using: 'node16'
5054
main: 'main.js'
5155
branding:
5256
color: 'blue'
53-
icon: 'arrow-up-circle'
57+
icon: 'arrow-up-circle'

main.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,13 @@ function run() {
108108
form = new FormData();
109109
form.append("file", fs.createReadStream(file_path));
110110
if (sourcemap_file_path) {
111-
form.append("sourcemap", fs.createReadStream(sourcemap_file_path));
111+
try {
112+
form.append("sourcemap", fs.createReadStream(sourcemap_file_path));
113+
}
114+
catch (err) {
115+
core.setFailed(err);
116+
return [2 /*return*/];
117+
}
112118
}
113119
// only append optional fields if explicitly set
114120
if (username) {

0 commit comments

Comments
 (0)