diff --git a/CHANGELOG.md b/CHANGELOG.md index ff52f9d..25829e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,103 @@ +## [0.4.0](https://git.kjan.de/jank/project-cli/compare/v0.3.3...v0.4.0) (2025-06-20) + +### Features + +* Add folder execution ([703db75](https://git.kjan.de/jank/project-cli/commit/703db757bc11edd233dca293528b0fad85365d5f)) +* add version argument ([618e00b](https://git.kjan.de/jank/project-cli/commit/618e00b677b21dbb8a143a2cd8c189e3aa672c89)) + +### Bug Fixes + +* Fix cli command ([7f5c721](https://git.kjan.de/jank/project-cli/commit/7f5c72143a6b4265fe0f1ac841cf12f5105a62aa)) +* fix init script ([de3f5e6](https://git.kjan.de/jank/project-cli/commit/de3f5e697c8170888180e606991d1aaa9c6c3738)) +* Merge ([3f6eab9](https://git.kjan.de/jank/project-cli/commit/3f6eab94c1b7b568228886f63e2529ad166bf316)) +* Remove stupid tag ([4cb16be](https://git.kjan.de/jank/project-cli/commit/4cb16be7fa93f9a1507f070fb0b8eaee7cf6947a)) +* test ([623ca27](https://git.kjan.de/jank/project-cli/commit/623ca27213c1902505eff61ec0b05993dc352dc2)) +* Try different cli script ([ccf3d39](https://git.kjan.de/jank/project-cli/commit/ccf3d391dd969aeb4d181887c568d6b5ef4864bd)) + +### Chores + +* Clean up imports ([50ecd8c](https://git.kjan.de/jank/project-cli/commit/50ecd8ce863e5996e47abb4fbad5f35e324ccc34)) +* **release:** 0.4.0 [skip ci] ([b6f77ae](https://git.kjan.de/jank/project-cli/commit/b6f77aed80069fb439cee2ec97a5b061119b9c49)) +* **release:** 0.4.0 [skip ci] ([16cb633](https://git.kjan.de/jank/project-cli/commit/16cb633fe16274131d5bb7ccbbc6626af6672901)) +* **release:** 0.4.0 [skip ci] ([506fc04](https://git.kjan.de/jank/project-cli/commit/506fc040545f331ce369ae5d634f5e8247eec218)) +* **release:** 0.4.0 [skip ci] ([b9bd05e](https://git.kjan.de/jank/project-cli/commit/b9bd05e4068be418975da981db32e69e97feb550)) + +## [0.4.0](https://git.kjan.de/jank/project-cli/compare/v0.3.3...v0.4.0) (2025-06-20) + +### Features + +* Add folder execution ([703db75](https://git.kjan.de/jank/project-cli/commit/703db757bc11edd233dca293528b0fad85365d5f)) +* add version argument ([618e00b](https://git.kjan.de/jank/project-cli/commit/618e00b677b21dbb8a143a2cd8c189e3aa672c89)) + +### Bug Fixes + +* Fix cli command ([7f5c721](https://git.kjan.de/jank/project-cli/commit/7f5c72143a6b4265fe0f1ac841cf12f5105a62aa)) +* fix init script ([de3f5e6](https://git.kjan.de/jank/project-cli/commit/de3f5e697c8170888180e606991d1aaa9c6c3738)) +* Merge ([3f6eab9](https://git.kjan.de/jank/project-cli/commit/3f6eab94c1b7b568228886f63e2529ad166bf316)) +* Remove stupid tag ([4cb16be](https://git.kjan.de/jank/project-cli/commit/4cb16be7fa93f9a1507f070fb0b8eaee7cf6947a)) +* Try different cli script ([ccf3d39](https://git.kjan.de/jank/project-cli/commit/ccf3d391dd969aeb4d181887c568d6b5ef4864bd)) + +### Chores + +* Clean up imports ([50ecd8c](https://git.kjan.de/jank/project-cli/commit/50ecd8ce863e5996e47abb4fbad5f35e324ccc34)) +* **release:** 0.4.0 [skip ci] ([16cb633](https://git.kjan.de/jank/project-cli/commit/16cb633fe16274131d5bb7ccbbc6626af6672901)) +* **release:** 0.4.0 [skip ci] ([506fc04](https://git.kjan.de/jank/project-cli/commit/506fc040545f331ce369ae5d634f5e8247eec218)) +* **release:** 0.4.0 [skip ci] ([b9bd05e](https://git.kjan.de/jank/project-cli/commit/b9bd05e4068be418975da981db32e69e97feb550)) + +## [0.4.0](https://git.kjan.de/jank/project-cli/compare/v0.3.3...v0.4.0) (2025-06-20) + +### Features + +* Add folder execution ([703db75](https://git.kjan.de/jank/project-cli/commit/703db757bc11edd233dca293528b0fad85365d5f)) +* add version argument ([618e00b](https://git.kjan.de/jank/project-cli/commit/618e00b677b21dbb8a143a2cd8c189e3aa672c89)) + +### Bug Fixes + +* Fix cli command ([7f5c721](https://git.kjan.de/jank/project-cli/commit/7f5c72143a6b4265fe0f1ac841cf12f5105a62aa)) +* fix init script ([de3f5e6](https://git.kjan.de/jank/project-cli/commit/de3f5e697c8170888180e606991d1aaa9c6c3738)) +* Merge ([3f6eab9](https://git.kjan.de/jank/project-cli/commit/3f6eab94c1b7b568228886f63e2529ad166bf316)) +* Try different cli script ([ccf3d39](https://git.kjan.de/jank/project-cli/commit/ccf3d391dd969aeb4d181887c568d6b5ef4864bd)) + +### Chores + +* Clean up imports ([50ecd8c](https://git.kjan.de/jank/project-cli/commit/50ecd8ce863e5996e47abb4fbad5f35e324ccc34)) +* **release:** 0.4.0 [skip ci] ([506fc04](https://git.kjan.de/jank/project-cli/commit/506fc040545f331ce369ae5d634f5e8247eec218)) +* **release:** 0.4.0 [skip ci] ([b9bd05e](https://git.kjan.de/jank/project-cli/commit/b9bd05e4068be418975da981db32e69e97feb550)) + +## [0.4.0](https://git.kjan.de/jank/project-cli/compare/v0.3.3...v0.4.0) (2025-06-19) + +### Features + +* Add folder execution ([703db75](https://git.kjan.de/jank/project-cli/commit/703db757bc11edd233dca293528b0fad85365d5f)) +* add version argument ([618e00b](https://git.kjan.de/jank/project-cli/commit/618e00b677b21dbb8a143a2cd8c189e3aa672c89)) + +### Bug Fixes + +* Fix cli command ([7f5c721](https://git.kjan.de/jank/project-cli/commit/7f5c72143a6b4265fe0f1ac841cf12f5105a62aa)) +* fix init script ([de3f5e6](https://git.kjan.de/jank/project-cli/commit/de3f5e697c8170888180e606991d1aaa9c6c3738)) +* Merge ([3f6eab9](https://git.kjan.de/jank/project-cli/commit/3f6eab94c1b7b568228886f63e2529ad166bf316)) + +### Chores + +* Clean up imports ([50ecd8c](https://git.kjan.de/jank/project-cli/commit/50ecd8ce863e5996e47abb4fbad5f35e324ccc34)) +* **release:** 0.4.0 [skip ci] ([b9bd05e](https://git.kjan.de/jank/project-cli/commit/b9bd05e4068be418975da981db32e69e97feb550)) + +## [0.4.0](https://git.kjan.de/jank/project-cli/compare/v0.3.3...v0.4.0) (2025-06-19) + +### Features + +* Add folder execution ([703db75](https://git.kjan.de/jank/project-cli/commit/703db757bc11edd233dca293528b0fad85365d5f)) +* add version argument ([618e00b](https://git.kjan.de/jank/project-cli/commit/618e00b677b21dbb8a143a2cd8c189e3aa672c89)) + +### Bug Fixes + +* fix init script ([de3f5e6](https://git.kjan.de/jank/project-cli/commit/de3f5e697c8170888180e606991d1aaa9c6c3738)) +* Merge ([3f6eab9](https://git.kjan.de/jank/project-cli/commit/3f6eab94c1b7b568228886f63e2529ad166bf316)) + +### Chores + +* Clean up imports ([50ecd8c](https://git.kjan.de/jank/project-cli/commit/50ecd8ce863e5996e47abb4fbad5f35e324ccc34)) + ## [0.3.3](https://git.kjan.de/jank/project-cli/compare/v0.3.2...v0.3.3) (2025-06-19) ### Bug Fixes diff --git a/a b/a new file mode 100644 index 0000000..e69de29 diff --git a/index.ts b/index.ts index 090ce46..a8204a8 100644 --- a/index.ts +++ b/index.ts @@ -14,11 +14,15 @@ import { import { execSync } from "child_process"; import { program } from "commander"; +import packageJson from "./package.json"; +export const VERSION = packageJson.version; + const CLI_NAME = "pcli"; program .name("project-cli") .description("A cli for managing projects") + .version(VERSION) .action(async () => { if (!fs.existsSync(configPath + "config.json")) { const createConfig = await confirm({ @@ -90,29 +94,25 @@ program choices: getProjects().map((project: Project) => project.name), }); - process.chdir(getConfiguration().projectsDirectory + "/" + pickedProject); + console.log( + "__EXEC__ cd " + + getConfiguration().projectsDirectory + + "/" + + pickedProject, + ); console.log(getProjects()); }); program.command("init").action(() => { console.log(`${CLI_NAME}() { - local output - output=$(command ${CLI_NAME} "$@") - local exit_code=$? - - if [ $exit_code -eq 0 ]; then - echo "$output" | while IFS= read -r line; do - if [[ $line == __EXEC__* ]]; then - eval "\${line#__EXEC__}" - else - echo "$line" - fi - done - else - echo "$output" >&2 - return $exit_code - fi + command ${CLI_NAME} "$@" | while IFS= read -r line; do + if [[ $line == __EXEC__* ]]; then + eval "\${line#__EXEC__}" + else + echo "$line" + fi + done }`); }); diff --git a/package-lock.json b/package-lock.json index b681fda..c69d755 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "proj-cli", - "version": "0.3.3", + "version": "0.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "proj-cli", - "version": "0.3.3", + "version": "0.4.0", "dependencies": { "@saithodev/semantic-release-gitea": "^2.1.0", "@semantic-release/changelog": "^6.0.3", diff --git a/package.json b/package.json index 9ffe94c..4c03195 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "proj-cli", - "version": "0.3.3", + "version": "0.4.0", "module": "index.ts", "type": "module", "bin": {