summaryrefslogtreecommitdiff
path: root/taler-build/update_deployment.sh
blob: c3ebe4afce5e35e25df286791e9e1cc0fec71726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# This update script is needed since shell scripts called
# by buildbot do NOT use the fresh deployment repo which is
# internal to buildbot, so we need to update the $HOME/deployment
# local check before starting the whole compilation

set -eu

cd $HOME/deployment
git clean -fdx

git fetch
# reset to updated upstream branch, but only if we're tracking a branch
branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo HEAD)
git reset --hard "$branch"