os/.drone/upstream-branch.sh
teutat3s 0f4f8eca37 Drone: follow new upstream default branch main, cron fixes (#30)
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/30
Co-authored-by: teutat3s <teutates@mailbox.org>
Co-committed-by: teutat3s <teutates@mailbox.org>
2021-10-05 19:32:54 +00:00

13 lines
213 B
Bash
Executable file

#!/usr/bin/env sh
set -e
set -u
LOCAL="$DRONE_BRANCH"
[ "$LOCAL" = "main" ] && UPSTREAM=origin/devos || UPSTREAM=origin/main
git fetch --all
git checkout "$LOCAL"
git merge "$UPSTREAM"
git push origin "$LOCAL"