git ssb

38+

cel / git-ssb



Commit ed966d033bbfee4d7929d01b8f6de313cfb18a7a

pkg build: enable cross-compiling

cel committed on 12/31/2019, 12:59:20 AM
Parent: 11e92841319cb69efcd6a01851a197cffa0a5d63

Files changed

build.jschanged
build.jsView
@@ -4,14 +4,16 @@
44 var fs = require('fs')
55 var mkdirp = require('mkdirp')
66 var pkgJson = require('./package')
77
8-var arch = os.arch()
9-var platform = os.platform()
10-var abi = process.versions.modules
11-var armv = process.env.ARM_VERSION || process.config.variables.arm_version || ''
8 +var platform = process.argv[2] || os.platform()
9 +var arch = process.argv[3] || os.arch()
10 +var abi = process.argv[4] || process.versions.modules
11 +var nodeVersion = process.argv[5] || pkgJson.nodeVersion
12 +var armv = process.argv[6] || (arch === 'arm' && process.config.variables.arm_version) || ''
1213 if (armv) armv = 'v' + armv
13-
14 +console.log('platform:', platform, 'arch:', arch, 'abi:', abi, 'armv:', armv,
15 + 'node:', nodeVersion)
1416 process.chdir(__dirname)
1517 mkdirp.sync('dist')
1618
1719 function cp(src, dest) {
@@ -31,9 +33,9 @@
3133 var pkg = proc.spawnSync('pkg', [
3234 'bin/git-ssb',
3335 '-c', 'package.json',
3436 '--public',
35- '-t', 'node' + pkgJson.nodeVersion + '-' + platform + '-' + arch + armv,
37 + '-t', 'node' + nodeVersion + '-' + platform + '-' + arch + armv,
3638 '-o', 'dist/git-ssb'
3739 ], {stdio: 'inherit'})
3840 if (pkg.status) process.exit(1)
3941

Built with git-ssb-web