platform -> hostPlatform because there will be targetPlatform

This commit is contained in:
Igor Klopov 2016-08-12 22:52:54 +03:00
parent 87c8b646eb
commit 2a1ac6cb39
3 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
import { hostPlatform, targetArchs } from './system.js';
import { localPlace, remotePlace } from './places.js';
import { platform, targetArchs } from './system.js';
import build from './build.js';
import chalk from 'chalk';
import patchesJson from '../patches/patches.json';
@ -16,11 +16,11 @@ export async function main () {
for (const nodeVersion in patchesJson) {
for (const targetArch of targetArchs) {
if (isBrokenBuild(nodeVersion, targetArch)) continue;
const local = localPlace({ arch: targetArch, nodeVersion, platform, version });
const local = localPlace({ arch: targetArch, nodeVersion, platform: hostPlatform, version });
console.error(`> ${chalk.yellow('Building')} ${nodeVersion}-${targetArch}`);
await build({ copyDest: local, nodeVersion, targetArch });
console.error(`> ${chalk.yellow('Uploading')} ${local}`);
const remote = remotePlace({ arch: targetArch, nodeVersion, platform, version });
const remote = remotePlace({ arch: targetArch, nodeVersion, platform: hostPlatform, version });
await upload(local, remote, version);
}
}

View File

@ -18,7 +18,7 @@ export function toFancyPlatform (platform) {
return platform;
}
function getPlatform () {
function getHostPlatform () {
const { platform } = process;
return toFancyPlatform(platform);
}
@ -57,7 +57,7 @@ function getKnownArchs () {
}
export const abi = getAbi();
export const platform = getPlatform();
export const hostPlatform = getHostPlatform();
export const hostArch = getHostArch();
export const targetArchs = getTargetArchs();
export const knownArchs = getKnownArchs();

View File

@ -2,6 +2,6 @@ import { system } from '../lib/index.js';
import test from 'ava';
test(async (t) => {
t.truthy(system.platform);
t.truthy(system.hostPlatform);
// TODO more?
});