vtasks-automate-cli 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/init.js +18 -1
  2. package/package.json +1 -1
package/init.js CHANGED
@@ -86,7 +86,24 @@ const main = async () => {
86
86
  const postCommitContent = `#!/bin/bash
87
87
 
88
88
  echo -e "\e[34mSwitching current branch\e[0m"
89
- node ./vTasks/index.js`;
89
+
90
+ folders=("client" "client-nextjs" "server")
91
+ executed=false
92
+
93
+ for folder in "\${folders[@]}"; do
94
+ script_path="./$folder/node_modules/vtasks-automate-cli/content/index.js"
95
+ if [ -f "$script_path" ]; then
96
+ echo -e "\e[32mEjecutando script en $script_path\e[0m"
97
+ node "$script_path"
98
+ executed=true
99
+ break # Salimos del bucle después de ejecutar una vez
100
+ fi
101
+ done
102
+
103
+ if [ "$executed" = false ]; then
104
+ echo -e "\e[33mNo se encontró el script vTasks/index.js en ninguna carpeta\e[0m"
105
+ fi
106
+ `;
90
107
 
91
108
  console.log(LOG_COLORS.GREEN, "Post-checkout hook added");
92
109
  fs.writeFileSync(postCommitFile, postCommitContent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vtasks-automate-cli",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Automate your vTasks workflow with ease — move tasks between states without opening the app",
5
5
  "bin": {
6
6
  "vtasks-automate": "init.js"