@panoptic-it-solutions/coolify-setup 1.1.24 → 1.1.25
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/dist/git.js +18 -3
- package/package.json +1 -1
package/dist/git.js
CHANGED
|
@@ -89,10 +89,25 @@ export async function commitAndPushToDevelop(files, originalBranch) {
|
|
|
89
89
|
}
|
|
90
90
|
else {
|
|
91
91
|
// On a feature branch - need to merge into develop
|
|
92
|
+
// First check if develop exists remotely
|
|
93
|
+
let developExistsRemotely = false;
|
|
92
94
|
try {
|
|
93
95
|
run('git fetch origin develop');
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
developExistsRemotely = true;
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
// Develop doesn't exist remotely
|
|
100
|
+
}
|
|
101
|
+
if (developExistsRemotely) {
|
|
102
|
+
// Checkout develop (create local tracking branch if needed)
|
|
103
|
+
try {
|
|
104
|
+
run('git checkout develop');
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
// Local develop doesn't exist, create from remote
|
|
108
|
+
run('git checkout -b develop origin/develop');
|
|
109
|
+
}
|
|
110
|
+
// Pull latest changes
|
|
96
111
|
try {
|
|
97
112
|
run('git pull --rebase origin develop');
|
|
98
113
|
}
|
|
@@ -103,7 +118,7 @@ export async function commitAndPushToDevelop(files, originalBranch) {
|
|
|
103
118
|
run(`git merge ${sourceBranch} --no-edit`);
|
|
104
119
|
run('git push origin develop');
|
|
105
120
|
}
|
|
106
|
-
|
|
121
|
+
else {
|
|
107
122
|
// Develop doesn't exist remotely, create it from source branch
|
|
108
123
|
run(`git push origin ${sourceBranch}:develop`);
|
|
109
124
|
}
|