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;