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) ]]
|
if [[ -z $(git branch --list $1) ]]
|
||||||
then
|
then
|
||||||
|
"[*] Creating deployment branch $1"
|
||||||
git checkout --orphan $1
|
git checkout --orphan $1
|
||||||
else
|
else
|
||||||
|
"[*] Deployment branch $1 exists, pulling changes from remote"
|
||||||
|
git pull origin $1 --force
|
||||||
git checkout $1
|
git checkout $1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -109,7 +112,7 @@ deploy() {
|
||||||
/bin/rm -rf *
|
/bin/rm -rf *
|
||||||
cp -r $tmp_dir/* .
|
cp -r $tmp_dir/* .
|
||||||
git add --all
|
git add --all
|
||||||
if [ ! -z $(git status --porcelain) ];
|
if [ -n $(git status --porcelain) ];
|
||||||
then
|
then
|
||||||
git commit \
|
git commit \
|
||||||
--author="$3" \
|
--author="$3" \
|
||||||
|
|
Loading…
Reference in New Issue