use fancy platform names win and osx
This commit is contained in:
parent
e46762ed40
commit
742f6fe3bb
@ -2,12 +2,11 @@ import { localPlace, remotePlace } from './places.js';
|
||||
import build from './build.js';
|
||||
import chalk from 'chalk';
|
||||
import patchesJson from '../patches/patches.json';
|
||||
import platform from './system.js';
|
||||
import { targets } from './system.js';
|
||||
import upload from './upload.js';
|
||||
import { version } from '../package.json';
|
||||
|
||||
const { platform } = process;
|
||||
|
||||
function isBrokenBuild (nodeVersion, target) {
|
||||
if (/^v?0/.test(nodeVersion) &&
|
||||
/^arm/.test(target)) return true;
|
||||
|
||||
@ -5,8 +5,7 @@ import path from 'path';
|
||||
import rimraf from 'rimraf-promise';
|
||||
import { spawn } from './spawn.js';
|
||||
|
||||
const platform = process.platform;
|
||||
const windows = platform === 'win32';
|
||||
const windows = process.platform === 'win32';
|
||||
const buildPath = path.resolve(__dirname, '../temp');
|
||||
const nodePath = path.join(buildPath, 'node');
|
||||
const patchesPath = path.resolve(__dirname, '../patches');
|
||||
|
||||
@ -4,6 +4,13 @@ function getAbi () {
|
||||
return 'm' + process.versions.modules;
|
||||
}
|
||||
|
||||
function getPlatform () {
|
||||
var platform = process.platform;
|
||||
if (platform === 'darwin') return 'osx';
|
||||
if (platform === 'win32') return 'win';
|
||||
return platform;
|
||||
}
|
||||
|
||||
function getArmHost () {
|
||||
var cpu = fs.readFileSync('/proc/cpuinfo', 'utf8');
|
||||
if (cpu.indexOf('vfpv3') >= 0) return 'armv7';
|
||||
@ -36,6 +43,7 @@ function getKnownTargets () {
|
||||
}
|
||||
|
||||
export const abi = getAbi();
|
||||
export const platform = getPlatform();
|
||||
export const host = getHost();
|
||||
export const targets = getTargets();
|
||||
export const knownTargets = getKnownTargets();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user