From 04223dbc58ec1f6e83e130ac0e1ac2641d6e05e8 Mon Sep 17 00:00:00 2001 From: Paulo Castro Date: Mon, 3 Jun 2019 16:01:36 +0100 Subject: [PATCH] Revert bin/balena (previously renamed bin/run for oclif compatibility) Change-type: major Signed-off-by: Paulo Castro --- bin/{run => balena} | 0 package.json | 2 +- patches/@oclif+dev-cli+1.22.0.patch | 10 ++++++---- 3 files changed, 7 insertions(+), 5 deletions(-) rename bin/{run => balena} (100%) diff --git a/bin/run b/bin/balena similarity index 100% rename from bin/run rename to bin/balena diff --git a/package.json b/package.json index 6b13325b..679ce057 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "lib/" ], "bin": { - "balena": "./bin/run" + "balena": "./bin/balena" }, "pkg": { "scripts": [ diff --git a/patches/@oclif+dev-cli+1.22.0.patch b/patches/@oclif+dev-cli+1.22.0.patch index 89ae3bb6..dc71f7ae 100644 --- a/patches/@oclif+dev-cli+1.22.0.patch +++ b/patches/@oclif+dev-cli+1.22.0.patch @@ -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()}`);