From 2ea0f897d5f8a0c3f9aa864f258c876c824023a8 Mon Sep 17 00:00:00 2001 From: calebboyd Date: Tue, 23 Oct 2018 10:23:34 -0500 Subject: [PATCH] chore: bump version --- package.json | 2 +- src/compiler.ts | 18 +++++++++--------- tasks/asset-compile.ts | 4 ++++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 22ec6cf..c2ac910 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "nexe", "description": "Create a single executable out of your Node.js application", "license": "MIT", - "version": "3.0.0-beta.6", + "version": "3.0.0-beta.7", "contributors": [ "Craig Condon (http://crcn.io)", "Jared Allard ", diff --git a/src/compiler.ts b/src/compiler.ts index e7e43eb..7a83610 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -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') } diff --git a/tasks/asset-compile.ts b/tasks/asset-compile.ts index b02e1a5..b28a28a 100644 --- a/tasks/asset-compile.ts +++ b/tasks/asset-compile.ts @@ -77,6 +77,10 @@ async function build() { ...headers, 'Content-Type': 'application/octet-stream' } + }).catch(reason => { + console.log(reason) + console.log(reason && reason.body) + throw reason }) console.log(target + ' uploaded.') }