chore: bump version

This commit is contained in:
calebboyd
2018-10-23 10:23:34 -05:00
parent cfa3036694
commit 2ea0f897d5
3 changed files with 14 additions and 10 deletions
+9 -9
View File
@@ -269,20 +269,20 @@ export class NexeCompiler {
return createReadStream(filename)
}
private async _shouldCompileBinaryAsync() {
const build = this.options.build
const binaryLocation = this.getNodeExecutableLocation()
private async _shouldCompileBinaryAsync(
binary: NodeJS.ReadableStream | null,
location: string | undefined
) {
//TODO combine make/configure/vcBuild/and modified times of included files
const { snapshot, build } = this.options
if (!(await pathExistsAsync(binaryLocation))) {
if (!binary) {
return true
}
const snapshot = this.options.snapshot
if (build && snapshot != null && (await pathExistsAsync(snapshot))) {
const snapshotLastModified = (await statAsync(snapshot)).mtimeMs
const binaryLastModified = (await statAsync(binaryLocation)).mtimeMs
const binaryLastModified = (await statAsync(location)).mtimeMs
// if build was requested and there's a snapshot to embed in the binary,
// we need to rebuild if the snapshot was just modified.
return snapshotLastModified > binaryLastModified
@@ -300,7 +300,7 @@ export class NexeCompiler {
step.modify('Fetching prebuilt binary')
binary = await this._fetchPrebuiltBinaryAsync(target)
}
if (await this._shouldCompileBinaryAsync()) {
if (await this._shouldCompileBinaryAsync(binary, location)) {
binary = await this._buildAsync()
step.log('Node binary compiled')
}