diff --git a/scripts/001-dvp.sh b/scripts/001-dvp.sh index a22d55a..35e88ba 100755 --- a/scripts/001-dvp.sh +++ b/scripts/001-dvp.sh @@ -25,9 +25,9 @@ fi if test ! -d "$REPO_FOLDER"; then git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER" else - git -C "$REPO_FOLDER" fetch origin - git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF" - git -C "$REPO_FOLDER" checkout "$REPO_REF" + git -C "$REPO_FOLDER" remote set-url origin "$REPO_URL" + git -C "$REPO_FOLDER" fetch origin "$REPO_REF" --depth=1 + git -C "$REPO_FOLDER" checkout -f FETCH_HEAD fi cd "$REPO_FOLDER" diff --git a/scripts/002-iop.sh b/scripts/002-iop.sh index 9537d96..1a752db 100755 --- a/scripts/002-iop.sh +++ b/scripts/002-iop.sh @@ -25,9 +25,9 @@ fi if test ! -d "$REPO_FOLDER"; then git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER" else - git -C "$REPO_FOLDER" fetch origin - git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF" - git -C "$REPO_FOLDER" checkout "$REPO_REF" + git -C "$REPO_FOLDER" remote set-url origin "$REPO_URL" + git -C "$REPO_FOLDER" fetch origin "$REPO_REF" --depth=1 + git -C "$REPO_FOLDER" checkout -f FETCH_HEAD fi cd "$REPO_FOLDER" diff --git a/scripts/003-ee.sh b/scripts/003-ee.sh index 06bea7f..4f1451b 100755 --- a/scripts/003-ee.sh +++ b/scripts/003-ee.sh @@ -25,9 +25,9 @@ fi if test ! -d "$REPO_FOLDER"; then git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER" else - git -C "$REPO_FOLDER" fetch origin - git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF" - git -C "$REPO_FOLDER" checkout "$REPO_REF" + git -C "$REPO_FOLDER" remote set-url origin "$REPO_URL" + git -C "$REPO_FOLDER" fetch origin "$REPO_REF" --depth=1 + git -C "$REPO_FOLDER" checkout -f FETCH_HEAD fi cd "$REPO_FOLDER"