forked from Hostea/website
fix: pull changes before committing changes to deployment branch
parent
7e14ebc543
commit
800bb5687c
|
@ -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" \
|
||||
|
|
Loading…
Reference in New Issue