os/.drone/upstream-branch.sh

13 lines
228 B
Bash
Raw Normal View History

2021-06-14 23:21:08 +00:00
#!/usr/bin/env sh
set -e
set -u
LOCAL="$DRONE_BRANCH"
[ "$LOCAL" = "core" ] && UPSTREAM=origin/devos || UPSTREAM=origin/core
git fetch --all
git checkout --track origin/"$LOCAL"
git merge "$UPSTREAM"
git push origin "$LOCAL"