Revert "Try not cloning again, fetch beforehand"

This reverts commit d0f3e14932.
This commit is contained in:
Oliver Davies 2017-07-25 02:28:24 +01:00
parent d0f3e14932
commit 25e0aab57c
2 changed files with 2 additions and 5 deletions

View file

@ -11,11 +11,8 @@ TARGET_BRANCH="master"
BUILD_DIR=".build"
# Prepare the build directory.
# git clone $REPO $BUILD_DIR
mkdir -p $BUILD_DIR
cp -R .git $BUILD_DIR
git clone $REPO $BUILD_DIR
pushd $BUILD_DIR
git fetch
git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
popd
rm -rf ${BUILD_DIR}/**/* || exit 0