fix(bootstrap): VPP clone 46/42946/4
authorPeter Mikus <[email protected]>
Tue, 13 May 2025 12:27:09 +0000 (14:27 +0200)
committerPeter Mikus <[email protected]>
Tue, 13 May 2025 12:28:53 +0000 (12:28 +0000)
Signed-off-by: Peter Mikus <[email protected]>
Change-Id: Ia0a30005035cd26919c838f0fa20c852b940fdab

resources/libraries/bash/function/per_patch.sh

index 44d73c5..745cf33 100644 (file)
@@ -76,18 +76,19 @@ function clone_vpp_repo () {
 
     set -exuo pipefail
 
-    pushd "${CSIT_DIR}/" || die "Pushd failed."
+    pushd "${CSIT_DIR}/" || die "Pushd failed!"
     git clone "${GIT_URL}/vpp" --depth=1 --no-single-branch --no-checkout || \
-        die "Failed to clone VPP repository."
-    pushd "${CSIT_DIR}/vpp" || die "Pushd failed."
+        die "Failed to clone VPP repository!"
+    pushd "${CSIT_DIR}/vpp" || die "Pushd failed!"
     if [[ -n "${VPP_VERSION-}" ]]; then
         git fetch "${GIT_URL}/vpp" "${VPP_VERSION}" || \
-            die "Failed to fetch specific commit id."
-        git checkout FETCH_HEAD || die "Checkout FETCH_HEAD failed."
+            die "Failed to fetch specific commit id!"
+        git checkout FETCH_HEAD || die "Checkout FETCH_HEAD failed!"
     else
-        git checkout HEAD || die "Checkout HEAD failed."
+        git fetch --unshallow || die "Unshallow failed!"
+        git checkout HEAD || die "Checkout HEAD failed!"
     fi
-    popd || die "Popd failed."
+    popd || die "Popd failed!"
 }