Compare commits

...

9 Commits

Author SHA1 Message Date
calebboyd 891ac0ab2a chore: badges 2018-10-04 08:20:00 -05:00
calebboyd 18bbf24456 chore: bump version 2018-10-04 08:20:00 -05:00
calebboyd 689160e833 fix: handle empty content when adding an empty file 2018-10-04 08:20:00 -05:00
calebboyd bd3ae2e80a chore: disable stdin in docker build 2018-10-04 08:20:00 -05:00
calebboyd 0447d8004c chore: append build error to log file 2018-10-04 08:19:59 -05:00
Jon Tore Hafstad 11be5a2573 chore(docs): resource should always we a glob string (#528)
To avoid confusion regarding the resource glob string, all examples i the readme should be in strings.
2018-10-04 08:19:03 -05:00
calebboyd 664dc6a11b chore: update arm version generator 2018-09-26 09:57:08 -05:00
calebboyd 4a7bfd99b6 chore: fix platform check 2018-09-25 11:48:39 -05:00
calebboyd a3af96eae8 chore: update travis auth 2018-09-25 11:36:09 -05:00
8 changed files with 17 additions and 15 deletions
+4 -2
View File
@@ -1,7 +1,9 @@
<p align="center"><img src="https://cloud.githubusercontent.com/assets/2391349/23598327/a17bb68a-01ee-11e7-8f55-88a5fc96e997.png" /></p>
<p align="center">
<a href="https://circleci.com/gh/nexe/nexe"><img src="https://img.shields.io/circleci/project/nexe/nexe.svg" alt="Build Status"></a>
<a href="https://circleci.com/gh/nexe/nexe"><img src="https://img.shields.io/circleci/project/github/nexe/nexe/master.svg" alt="Mac Build Status"></a>
<a href="https://travis-ci.org/nexe/nexe/builds"><img src="https://img.shields.io/travis/nexe/nexe/master.svg" alt="Linux Build Status"></a>
<a href="https://ci.appveyor.com/project/calebboyd/nexe/history"><img src="https://img.shields.io/appveyor/ci/calebboyd/nexe/master.svg" alt="Windows Build Status"></a>
<a href="https://www.npmjs.com/package/nexe"><img src="https://img.shields.io/npm/dt/nexe.svg" alt="Downloads"></a>
<a href="https://www.npmjs.com/package/nexe"><img src="https://img.shields.io/npm/v/nexe.svg" alt="Version"></a>
<a href="https://www.npmjs.com/package/nexe"><img src="https://img.shields.io/npm/l/nexe.svg" alt="License"></a>
@@ -40,7 +42,7 @@ For more CLI options see: `nexe --help`
### Examples
- `nexe server.js -r public/**/*.html`
- `nexe server.js -r "public/**/*.html"`
- `nexe my-bundle.js --no-bundle -o app.exe`
- `nexe --build`
- `nexe -t x86-8.0.0`
+2 -1
View File
@@ -5,7 +5,7 @@ environment:
CIRCLE_TOKEN:
secure: TQKcepXmTzCNt4+tUBtYpwEQkdSPwFr9A8ugtoMhNbKu/SW1WM1EpjEu6kYXxpQ4
TRAVIS_TOKEN:
secure: tR7HXYv3x97q90uvPrjUxKZh7R1+uqKct0HdEcqTbsg=
secure: 6ni/E6Rbmv6cFWW7QNLkpQY2fVpT7wr7y12GEtektN0=
GITHUB_TOKEN:
secure: 3wuEGJsppSKFvdwhp3jprUA9Zkc3WINlc/9oFXjhAR6J05lYMXP7Fl7lXTKpkGZx
install:
@@ -20,3 +20,4 @@ build_script:
- npm run asset-compile
artifacts:
- path: $(HOMEPATH)\.nexe\**\node.exe
Executable
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "nexe",
"description": "Create a single executable out of your Node.js application",
"license": "MIT",
"version": "3.0.0-beta.0",
"version": "3.0.0-beta.1",
"contributors": [
"Craig Condon <craig.j.condon@gmail.com> (http://crcn.io)",
"Jared Allard <jaredallard@outlook.com>",
+1 -1
View File
@@ -42,7 +42,7 @@ export class Bundle {
async addResource(absoluteFileName: string, content?: Buffer | string) {
let length = 0
if (content) {
if (content !== undefined) {
length = Buffer.byteLength(content)
} else {
const stats = await stat(absoluteFileName)
+3 -3
View File
@@ -25,8 +25,8 @@ async function getJson<T>(url: string, options?: any) {
}
function isBuildableVersion(version: string) {
const major = +version.split('.')[0]
return !~versionsToSkip.indexOf(major) || version === '4.8.4'
const major = Number(version.split('.')[0])
return !versionsToSkip.includes(major) || version === '4.8.4'
}
export function getLatestGitRelease(options?: any) {
@@ -50,7 +50,7 @@ export async function getUnBuiltReleases(options?: any) {
platforms.forEach(platform => {
architectures.forEach(arch => {
if (arch === 'x86' && platform === 'mac') return
if (arch === 'arm7l' && platform !== 'linux') return
if (arch.includes('arm')) return
versions.push(getTarget({ platform, arch, version }))
})
})
+3 -4
View File
@@ -60,7 +60,7 @@ async function build() {
}
console.log('Building: ', target)
const stop = keepalive()
if (['arm7l', 'arm6l', 'arm64', 'alpine'].indexOf(target.platform)) {
if (['arm7l', 'arm6l', 'arm64', 'alpine'].includes(target.platform)) {
await runDockerBuild(target)
} else {
await nexe.compile(options)
@@ -74,9 +74,8 @@ async function build() {
query: { name: target.toString() },
body: await readFileAsync(output),
headers: {
Authorization: 'token ' + env.GITHUB_TOKEN,
'Content-Type': 'application/octet-stream',
'User-Agent': 'nexe (https://www.npmjs.com/package/nexe)'
...headers,
'Content-Type': 'application/octet-stream'
}
})
console.log(target + ' uploaded.')
+3 -3
View File
@@ -1,6 +1,5 @@
import { NexeTarget, architectures } from '../lib/target'
import { writeFileAsync, readFileAsync } from '../lib/util'
import { spawn } from 'child_process'
import got = require('got')
import execa = require('execa')
import { appendFileSync } from 'fs'
@@ -22,7 +21,7 @@ RUN curl -sSL https://nodejs.org/dist/v\${NODE_VERSION}/node-v\${NODE_VERSION}.t
RUN rm /nexe_temp/\${NODE_VERSION}/out/Release/node && \
npm install -g nexe@\${NEXE_VERSION} && \
nexe --build --empty --temp /nexe_temp -c="--fully-static" -o out
nexe --build --empty --temp /nexe_temp -c="--fully-static" -o out --enableStdIn=false
`.trim()
}
@@ -51,7 +50,8 @@ export async function runDockerBuild(target: NexeTarget) {
output.push(await execa.shell(`docker cp nexe:/out out`))
output.push(await execa.shell(`docker rm nexe`))
} catch (e) {
console.log('Error running docker', e)
console.log('Error running docker')
appendFileSync(outFilename, e.message)
} finally {
output.forEach((x: any) => {
appendFileSync(outFilename, x.stderr)