feat: stash changes before checkout
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
b79e6fa2ba
commit
a1d1e7413d
1 changed files with 2 additions and 0 deletions
|
@ -101,10 +101,12 @@ deploy() {
|
||||||
if [[ -z $(git ls-remote --heads origin ${1}) ]]
|
if [[ -z $(git ls-remote --heads origin ${1}) ]]
|
||||||
then
|
then
|
||||||
echo "[*] Creating deployment branch $1"
|
echo "[*] Creating deployment branch $1"
|
||||||
|
git stash
|
||||||
git checkout --orphan $1
|
git checkout --orphan $1
|
||||||
else
|
else
|
||||||
echo "[*] Deployment branch $1 exists, pulling changes from remote"
|
echo "[*] Deployment branch $1 exists, pulling changes from remote"
|
||||||
git fetch origin $1
|
git fetch origin $1
|
||||||
|
git stash
|
||||||
git switch $1
|
git switch $1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue