Properly checkout the desired branch

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv)
2018-12-07 16:59:26 +01:00
parent f54b83c12d
commit 5c97567654

View File

@@ -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;