From 833596b8d817a98f9cc7be3eb851c42729d467db Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Tue, 30 Nov 2021 19:44:09 +0900 Subject: [PATCH] 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. --- buildbot.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.47.3