From 7ef3987aa0fa19a5920a18000c4666ce4a95a85b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Sat, 1 Apr 2023 10:39:41 -0300 Subject: [PATCH 1/6] fix(bin): use shell script to execute bin --- bin/.bin | 5 +++++ package-lock.json | 6 +++--- package.json | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 bin/.bin diff --git a/bin/.bin b/bin/.bin new file mode 100644 index 0000000..12c0298 --- /dev/null +++ b/bin/.bin @@ -0,0 +1,5 @@ +#!/bin/bash + +SCRIPT_DIR="$(dirname "$(realpath "$0")")" + +node --experimental-import-meta-resolve $SCRIPT_DIR/main.js diff --git a/package-lock.json b/package-lock.json index 807dd59..7802d8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/cli", - "version": "3.1.0", + "version": "3.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/cli", - "version": "3.1.0", + "version": "3.1.2", "license": "MIT", "dependencies": { "@athenna/artisan": "^3.7.0", @@ -20,7 +20,7 @@ "reflect-metadata": "^0.1.13" }, "bin": { - "athenna": "bin/main.js" + "athenna": "bin/.bin" }, "devDependencies": { "@athenna/test": "^3.3.0", diff --git a/package.json b/package.json index e32ebc6..9e0991c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/cli", - "version": "3.1.1", + "version": "3.1.2", "description": "Athenna CLI to create new Athenna projects.", "license": "MIT", "author": "João Lenon ", @@ -27,7 +27,7 @@ ".athennarc.prod.json" ], "bin": { - "athenna": "./bin/main.js" + "athenna": "./bin/.bin" }, "scripts": { "start": "sh node artisan serve", From 5ca5aaa8179762409f91ddca55ed2fba17f2f74b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Sat, 1 Apr 2023 10:41:32 -0300 Subject: [PATCH 2/6] ci(node): add node version 16 again --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9731fc9..d6825cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,7 @@ jobs: strategy: matrix: node-version: + - 16.13.1 - 18.x steps: - uses: actions/checkout@v2 From abc520fc4cab40fee81221ccdc082d0209b45be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Sat, 1 Apr 2023 10:51:34 -0300 Subject: [PATCH 3/6] fix(bin): add args to script --- bin/.bin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/.bin b/bin/.bin index 12c0298..cd5e9b5 100644 --- a/bin/.bin +++ b/bin/.bin @@ -2,4 +2,4 @@ SCRIPT_DIR="$(dirname "$(realpath "$0")")" -node --experimental-import-meta-resolve $SCRIPT_DIR/main.js +node --experimental-import-meta-resolve $SCRIPT_DIR/main.js $@ From 67408dc351c2d44f2a251fc28b5ad5af58c0ff53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Sat, 1 Apr 2023 10:54:10 -0300 Subject: [PATCH 4/6] fix(bin): set file as executable --- bin/.bin | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bin/.bin diff --git a/bin/.bin b/bin/.bin old mode 100644 new mode 100755 From 5f9a82265273b3e56c376652616b1c86c556c8d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Sat, 1 Apr 2023 11:00:49 -0300 Subject: [PATCH 5/6] fix(bin): try using sh --- bin/.bin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/.bin b/bin/.bin index cd5e9b5..b829182 100755 --- a/bin/.bin +++ b/bin/.bin @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh SCRIPT_DIR="$(dirname "$(realpath "$0")")" From bf94abee55e47103e4e921b6418e86f82ffa1887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Sat, 1 Apr 2023 11:05:50 -0300 Subject: [PATCH 6/6] ci(windows): set shell as bash when linking cli --- .github/workflows/ci.yml | 1 + bin/.bin | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6825cb..244412f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,4 +72,5 @@ jobs: run: sh node artisan build - name: Link the package and run the CLI + shell: bash run: npm link . && athenna --version diff --git a/bin/.bin b/bin/.bin index b829182..cd5e9b5 100755 --- a/bin/.bin +++ b/bin/.bin @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash SCRIPT_DIR="$(dirname "$(realpath "$0")")"