Revert bin/balena (previously renamed bin/run for oclif compatibility)

Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
This commit is contained in:
Paulo Castro 2019-06-03 16:01:36 +01:00
parent b5c4348de1
commit 04223dbc58
3 changed files with 7 additions and 5 deletions

View File

View File

@ -16,7 +16,7 @@
"lib/"
],
"bin": {
"balena": "./bin/run"
"balena": "./bin/balena"
},
"pkg": {
"scripts": [

View File

@ -36,7 +36,7 @@ index a9d4276..75c2f8b 100644
exports.default = PackWin;
const scripts = {
diff --git a/node_modules/@oclif/dev-cli/lib/tarballs/build.js b/node_modules/@oclif/dev-cli/lib/tarballs/build.js
index 3e613e0..393516c 100644
index 3e613e0..621d52b 100644
--- a/node_modules/@oclif/dev-cli/lib/tarballs/build.js
+++ b/node_modules/@oclif/dev-cli/lib/tarballs/build.js
@@ -19,6 +19,9 @@ const pack = async (from, to) => {
@ -49,7 +49,7 @@ index 3e613e0..393516c 100644
const packCLI = async () => {
const stdout = await qq.x.stdout('npm', ['pack', '--unsafe-perm'], { cwd: c.root });
return path.join(c.root, stdout.split('\n').pop());
@@ -34,6 +37,28 @@ async function build(c, options = {}) {
@@ -34,6 +37,30 @@ async function build(c, options = {}) {
await qq.mv(f, '.');
await qq.rm('package', tarball, 'bin/run.cmd');
};
@ -73,12 +73,14 @@ index 3e613e0..393516c 100644
+ }
+ }
+ }
+ // rename the original balena-cli ./bin/balena entry point for oclif compatibility
+ await qq.mv('bin/balena', 'bin/run');
+ await qq.rm('bin/run.cmd');
+ }
const updatePJSON = async () => {
qq.cd(c.workspace());
const pjson = await qq.readJSON('package.json');
@@ -55,7 +80,11 @@ async function build(c, options = {}) {
@@ -55,7 +82,11 @@ async function build(c, options = {}) {
if (!await qq.exists(lockpath)) {
lockpath = qq.join(c.root, 'npm-shrinkwrap.json');
}
@ -91,7 +93,7 @@ index 3e613e0..393516c 100644
await qq.x('npm install --production');
}
};
@@ -124,7 +153,8 @@ async function build(c, options = {}) {
@@ -124,7 +155,8 @@ async function build(c, options = {}) {
await qq.writeJSON(c.dist(config.s3Key('manifest')), manifest);
};
log_1.log(`gathering workspace for ${config.bin} to ${c.workspace()}`);