platypush/.drone/sync-stable-branch.sh
Fabio Manganiello 7fa0dbda7b
Split Drone CI steps into separate shell scripts.
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).
2024-05-23 00:17:55 +02:00

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"