fix: ia32 target normalization

This commit is contained in:
calebboyd
2017-09-27 00:55:06 -05:00
parent 5c9cf3580c
commit 4390568654
6 changed files with 14 additions and 11 deletions
+2 -2
View File
@@ -7,11 +7,11 @@ environment:
secure: 3wuEGJsppSKFvdwhp3jprUA9Zkc3WINlc/9oFXjhAR6J05lYMXP7Fl7lXTKpkGZx
install:
- ps: Install-Product node 6
- npm i
- yarn
build: off
test: off
build_script:
- npm run asset-compile
- yarn run asset-compile
artifacts:
- path: .nexe\**\node.exe
cache:
+2 -1
View File
@@ -63,7 +63,8 @@ export function targetsEqual(a: NexeTarget, b: NexeTarget) {
}
export function getTarget(target: string | Partial<NexeTarget> = ''): NexeTarget {
let arch = process.arch as NodeArch,
const currentArch = process.arch
let arch = currentArch in prettyArch ? prettyArch[process.arch] : process.arch as NodeArch,
platform = prettyPlatform[process.platform],
version = process.version.slice(1)
+4 -4
View File
@@ -1,12 +1,12 @@
import * as nexe from '../src/nexe'
import * as nexe from '../lib/nexe'
import {
getUnBuiltReleases,
getLatestGitRelease
} from '../src/releases'
} from '../lib/releases'
import * as ci from './ci'
import { runAlpineBuild } from './docker'
import { getTarget } from '../src/target'
import { pathExistsAsync, statAsync, readFileAsync, execFileAsync } from '../src/util'
import { getTarget } from '../lib/target'
import { pathExistsAsync, statAsync, readFileAsync, execFileAsync } from '../lib/util'
import got = require('got')
const env = process.env,
+1 -1
View File
@@ -1,4 +1,4 @@
import { NexeTarget } from '../src/releases'
import { NexeTarget } from '../lib/releases'
import got = require('got')
import * as assert from 'assert'
const { env } = process
+2 -2
View File
@@ -1,5 +1,5 @@
import { NexeTarget } from '../src/target'
import { writeFileAsync, readFileAsync } from '../src/util'
import { NexeTarget } from '../lib/target'
import { writeFileAsync, readFileAsync } from '../lib/util'
import { spawn } from 'child_process'
import got = require('got')
import { createWriteStream, WriteStream } from 'fs'
+3 -1
View File
@@ -20,9 +20,11 @@ function inject (filename: string, ...replacements: string[]) {
if (replace !== 'replace') {
return substring
}
console.log('Replacing: ', substring)
return replacements[+file]
? replacements[+file]
: JSON.stringify(readFileSync(file, 'utf8'))
})
})
writeFileSync(filename, contents)
console.log(`Wrote: ${filename}`)
}