This commit is contained in:
병준 박 2025-04-15 09:59:18 +00:00
parent 19f55a8831
commit e84b1069bc

View File

@ -168,19 +168,14 @@ spec:
rm -rf "$CLONE_DIR"
echo "[INFO] Cloning repository..."
git clone --depth=$(params.depth) $(params.url) "$CLONE_DIR"
cd "$CLONE_DIR"
else
echo "1"
cd "$CLONE_DIR"
echo "2"
git init
echo "3"
git remote add origin $(params.url)
echo "4"
git pull --depth=$(params.depth) origin master --allow-unrelated-histories
cd "$CLONE_DIR"
echo "[INFO] Cloning repository..."
git clone --depth=$(params.depth) $(params.url) "${CLONE_DIR}_"
mv "${CLONE_DIR}_/*" "${CLONE_DIR}"
fi
cd "$CLONE_DIR"
if [ -n "$(params.refspec)" ]; then
git fetch origin $(params.refspec)
fi