Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prebuild.js for using the right cli arch while building electron-app #1311

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion scripts/prebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function main() {
const rootDir = path.dirname(__dirname);
const distDir = path.join(rootDir, 'dist');
const tempDir = path.join(distDir, 'temp');
const platforms = ['linux', 'mac', 'win'];
const platforms = ['linux', 'mac', 'win', 'arm-linux', 'arm-mac'];

const binDirs = new Map();
platforms.forEach((platform) =>
Expand Down Expand Up @@ -121,6 +121,10 @@ function getPlatformUrlSuffix(platform) {
return 'x86_64-apple-darwin.tar.gz';
case 'win':
return 'x86_64-w64-mingw32.zip';
case 'arm-linux':
return 'aarch64-linux-gnu.tar.gz';
case 'arm-mac':
return 'aarch64-apple-darwin.tar.gz';
default:
throw new Error('invalid platform');
}
Expand All @@ -137,6 +141,17 @@ function processPlatformArg(arg) {
case 'mac':
case 'darwin':
return 'mac';
case 'arm-linux':
case 'arm64-linux':
case 'aarch64-linux':
case 'arm':
case 'arm64':
case 'aarch64':
return 'arm-linux';
case 'arm-mac':
case 'arm64-mac':
case 'aarch64-mac':
return 'arm-mac';
default:
throw new Error('invalid platform arg');
}
Expand Down
Loading