@panoptic-it-solutions/coolify-setup 1.1.21 → 1.1.22
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 +8 -1
- package/package.json +1 -1
package/dist/git.js
CHANGED
|
@@ -84,7 +84,13 @@ export async function commitAndPushToDevelop(files) {
|
|
|
84
84
|
try {
|
|
85
85
|
const currentBranch = run('git branch --show-current');
|
|
86
86
|
if (currentBranch === 'develop') {
|
|
87
|
-
//
|
|
87
|
+
// Pull latest changes with rebase, then push
|
|
88
|
+
try {
|
|
89
|
+
run('git pull --rebase origin develop');
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
// Pull might fail if remote doesn't exist yet, that's ok
|
|
93
|
+
}
|
|
88
94
|
run('git push origin develop');
|
|
89
95
|
}
|
|
90
96
|
else {
|
|
@@ -93,6 +99,7 @@ export async function commitAndPushToDevelop(files) {
|
|
|
93
99
|
run('git fetch origin develop');
|
|
94
100
|
// Develop exists, checkout and merge/rebase current changes
|
|
95
101
|
run('git checkout develop');
|
|
102
|
+
run('git pull --rebase origin develop');
|
|
96
103
|
run(`git merge ${currentBranch} --no-edit`);
|
|
97
104
|
run('git push origin develop');
|
|
98
105
|
}
|