fix: pull changes before committing changes to deployment branch
ci/woodpecker/push/woodpecker Pipeline failed Details

pull/6/head
Aravinth Manivannan 2022-04-16 13:08:23 +05:30
parent 7e14ebc543
commit 800bb5687c
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
1 changed files with 4 additions and 1 deletions

View File

@ -100,8 +100,11 @@ deploy() {
if [[ -z $(git branch --list $1) ]]
then
"[*] Creating deployment branch $1"
git checkout --orphan $1
else
"[*] Deployment branch $1 exists, pulling changes from remote"
git pull origin $1 --force
git checkout $1
fi
@ -109,7 +112,7 @@ deploy() {
/bin/rm -rf *
cp -r $tmp_dir/* .
git add --all
if [ ! -z $(git status --porcelain) ];
if [ -n $(git status --porcelain) ];
then
git commit \
--author="$3" \