From 5c97567654aeacf0ddcdd35050f51c9f291ee55d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Fri, 7 Dec 2018 16:59:26 +0100 Subject: [PATCH] Properly checkout the desired branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- build/get-server-sources.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/get-server-sources.sh b/build/get-server-sources.sh index 9cec52c33..2ceb058fc 100755 --- a/build/get-server-sources.sh +++ b/build/get-server-sources.sh @@ -11,7 +11,11 @@ echo Fetching source for $NC_BRANCH printf "\n" if [ -d server/.git ]; then - cd server && git fetch && git checkout $NC_BRANCH && git reset --hard origin/$NC_BRANCH + cd server + git remote set-branches --add origin $NC_BRANCH + git fetch + git checkout $NC_BRANCH + git reset --hard origin/$NC_BRANCH else - git clone https://github.com/nextcloud/server server --depth 1 + git clone https://github.com/nextcloud/server server --depth 1 --branch $NC_BRANCH fi;