Skip to content

Commit 699aca9

Browse files
feat(npm): Add support for installing npm package on Android (#2524)
Android systems should be able to run the Linux binary. This change enables the Linux binary to be fetched when the `npm` package is installed on an Android system. Fixes #2288
1 parent cdc321b commit 699aca9

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

js/helper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function getDistributionForThisPlatform() {
4040
let packageName = undefined;
4141
if (platform === 'darwin') {
4242
packageName = '@sentry/cli-darwin';
43-
} else if (platform === 'linux' || platform === 'freebsd') {
43+
} else if (platform === 'linux' || platform === 'freebsd' || platform === 'android') {
4444
switch (arch) {
4545
case 'x64':
4646
packageName = '@sentry/cli-linux-x64';
@@ -79,6 +79,7 @@ function getDistributionForThisPlatform() {
7979
case 'darwin':
8080
case 'linux':
8181
case 'freebsd':
82+
case 'android':
8283
subpath = 'bin/sentry-cli';
8384
break;
8485
default:

npm-binary-distributions/linux-arm/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
},
1313
"os": [
1414
"linux",
15-
"freebsd"
15+
"freebsd",
16+
"android"
1617
],
1718
"cpu": [
1819
"arm"

npm-binary-distributions/linux-arm64/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
},
1313
"os": [
1414
"linux",
15-
"freebsd"
15+
"freebsd",
16+
"android"
1617
],
1718
"cpu": [
1819
"arm64"

npm-binary-distributions/linux-i686/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
},
1313
"os": [
1414
"linux",
15-
"freebsd"
15+
"freebsd",
16+
"android"
1617
],
1718
"cpu": [
1819
"x86",

npm-binary-distributions/linux-x64/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
},
1313
"os": [
1414
"linux",
15-
"freebsd"
15+
"freebsd",
16+
"android"
1617
],
1718
"cpu": [
1819
"x64"

scripts/install.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function getDownloadUrl(platform, arch) {
8181
return `${releasesUrl}-Windows-${archString}.exe`;
8282
case 'linux':
8383
case 'freebsd':
84+
case 'android':
8485
return `${releasesUrl}-Linux-${archString}`;
8586
default:
8687
return null;

0 commit comments

Comments
 (0)