feat: loong64 support for reh server (#2087)

This commit is contained in:
darkyzhou
2024-11-05 01:54:40 +08:00
committed by GitHub
parent d736414896
commit a023a24173
10 changed files with 179 additions and 7 deletions

View File

@@ -1,9 +1,12 @@
diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js
index d45d5bc..81a6449 100644
index 88e3c9e..4cad4f1 100644
--- a/build/npm/postinstall.js
+++ b/build/npm/postinstall.js
@@ -56,3 +56,3 @@ function yarnInstall(dir, opts) {
@@ -55,4 +55,6 @@ function npmInstall(dir, opts) {
opts.cwd = root;
- if (process.env['npm_config_arch'] === 'arm64') {
+ if (process.env['npm_config_arch'] === 'arm64' || process.env['npm_config_arch'] === 'arm' || process.env['npm_config_arch'] === 'ppc64' || process.env['npm_config_arch'] === 'riscv64') {
run('sudo', ['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], opts);
+ } else if (process.env['npm_config_arch'] === 'loong64') {
+ run('sudo', ['docker', 'run', '--rm', '--privileged', 'loongcr.lcpu.dev/multiarch/archlinux', '--reset', '-p', 'yes'], opts);
}