mirror of
https://github.com/watchexec/watchexec.git
synced 2024-11-16 09:08:37 +01:00
16 lines
410 B
Bash
Executable file
16 lines
410 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
[[ ! -z "$WORKSPACE_ROOT" ]] && cd "$WORKSPACE_ROOT"
|
|
|
|
set -euo pipefail
|
|
|
|
mainbranch="main"
|
|
upstream_rx="watchexec/"
|
|
upstream=$(git remote -v | grep -i "$upstream_rx" -m1 | awk '{print $1}')
|
|
echo "Upstream remote discovered as: $upstream"
|
|
|
|
echo "Pulling from upstream"
|
|
git pull --rebase --autostash "$upstream" "$mainbranch"
|
|
|
|
echo "Fetching tags from upstream"
|
|
git fetch --tags "$upstream"
|