forked from platypush/platypush
Fabio Manganiello
7fa0dbda7b
A fully self-contained 1.5k LoC Drone file isn't very maintainable, and it makes it hard to reuse parts that are shared across multiple steps (like SSH and git configuration).
18 lines
419 B
Bash
Executable file
18 lines
419 B
Bash
Executable file
#!/bin/sh
|
|
|
|
. .drone/macros/configure-git.sh
|
|
. .drone/macros/configure-ssh.sh
|
|
. .drone/macros/configure-gpg.sh
|
|
|
|
# Git configuration
|
|
git remote rm origin
|
|
git remote add origin git@git.platypush.tech:platypush/platypush.git
|
|
|
|
# Merge and push to the `stable` branch
|
|
git checkout stable
|
|
git rebase master
|
|
git push -u origin stable
|
|
git checkout master
|
|
|
|
# Restore the original git configuration
|
|
mv "$TMP_GIT_CONF" "$GIT_CONF"
|