list of possible targets out of current host (x64,x86 out of x64)
This commit is contained in:
parent
8d5c61d3fc
commit
253b06bc04
22
lib/build.js
22
lib/build.js
@ -1,4 +1,4 @@
|
||||
import { arch, platform } from './system.js';
|
||||
import { arch, platform, targets } from './system.js';
|
||||
import chipo from 'child-process-promise';
|
||||
import chalk from 'chalk';
|
||||
import { localPath } from './places.js';
|
||||
@ -13,18 +13,20 @@ const patchesPath = path.resolve(__dirname, '../patches');
|
||||
|
||||
async function main () {
|
||||
for (const nodeVersion in patchesJson) {
|
||||
await rimraf(buildPath);
|
||||
await mkdirp(buildPath);
|
||||
for (const target of targets) {
|
||||
await rimraf(buildPath);
|
||||
await mkdirp(buildPath);
|
||||
|
||||
await chipo.spawn('git',
|
||||
[ 'clone', 'https://github.com/nodejs/node', 'node' ],
|
||||
{ stdio: 'inherit', cwd: buildPath });
|
||||
await chipo.spawn('git',
|
||||
[ 'clone', 'https://github.com/nodejs/node', 'node' ],
|
||||
{ stdio: 'inherit', cwd: buildPath });
|
||||
|
||||
await chipo.spawn('git',
|
||||
[ 'reset', '--hard', nodeVersion ],
|
||||
{ stdio: 'inherit', cwd: buildPath + '/node' });
|
||||
await chipo.spawn('git',
|
||||
[ 'reset', '--hard', nodeVersion ],
|
||||
{ stdio: 'inherit', cwd: buildPath + '/node' });
|
||||
|
||||
// const patches = patchesJson[nodeVersion];
|
||||
// const patches = patchesJson[nodeVersion];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -21,6 +21,12 @@ function getArch () {
|
||||
return arch;
|
||||
}
|
||||
|
||||
function getTargets () {
|
||||
// TODO x64, x86 from 'x64'?
|
||||
return getArch();
|
||||
}
|
||||
|
||||
export const abi = getAbi();
|
||||
export const arch = getArch();
|
||||
export const platform = process.platform;
|
||||
export const targets = getTargets();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user