fix: switch back to original branch after deployment commit
ci/woodpecker/push/woodpecker Pipeline failed Details

pull/6/head
Aravinth Manivannan 2022-04-16 11:34:38 +05:30
parent d6c654783a
commit 0ec3ba2c02
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
1 changed files with 2 additions and 0 deletions

View File

@ -94,6 +94,7 @@ clean() {
# $3: Author in <author-name author@example.com> format
deploy() {
cd $PROJECT_ROOT
original_branch=$(git branch --show-current)
tmp_dir=$(mktemp -d)
cp -r $2/* $tmp_dir
git checkout --orphan $1
@ -104,6 +105,7 @@ deploy() {
git commit \
--author="$3" \
--message="new deploy: $(date --iso-8601=seconds)"
git checkout $original_branch
}
check_arg $1