vtasks-automate-cli 0.6.2 → 0.6.4
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.
- package/content/index.js +1 -1
- package/init.js +18 -1
- package/package.json +1 -1
package/content/index.js
CHANGED
|
@@ -103,7 +103,7 @@ async function main() {
|
|
|
103
103
|
if (branch != "qa" && branch != "dev" && branch != "master") {
|
|
104
104
|
issueNumber = Number(branch.split("_")[0]);
|
|
105
105
|
console.log(LOG_COLORS.GREEN, `Currently working on issue: ${issueNumber}`);
|
|
106
|
-
const response = await fetch(
|
|
106
|
+
const response = await fetch(VTASKS_URL, {
|
|
107
107
|
method: "POST",
|
|
108
108
|
body: JSON.stringify({
|
|
109
109
|
projectName,
|
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
|
-
|
|
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);
|