From: Matthias Kruk Date: Tue, 30 Nov 2021 10:44:09 +0000 (+0900) Subject: buildbot: Check out the target branch in a separate statement X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=833596b8d817a98f9cc7be3eb851c42729d467db;p=foundry buildbot: Check out the target branch in a separate statement Buildbot fails to perform any builds because it attempts to check out a ref (referencing a commit) using git clone's `-b' switch, which only accepts branch references. This commit modifies buildbot to check out the ref in a separate call to `git checkout', which allows commit refs to be checked out. --- diff --git a/buildbot.sh b/buildbot.sh index 26f6836..3e80cec 100755 --- a/buildbot.sh +++ b/buildbot.sh @@ -27,7 +27,8 @@ build() { err=0 - if ! output=$(git clone "$repository" -b "$branch" "$builddir/sources" 2>&1); then + if ! output=$(git clone "$repository" "$builddir/sources" 2>&1) || + ! output+=$(cd "$builddir/sources" 2>&1 && git checkout "$branch" 2>&1); then err=1 fi