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" rm -rf "$CLONE_DIR"
echo "[INFO] Cloning repository..." echo "[INFO] Cloning repository..."
git clone --depth=$(params.depth) $(params.url) "$CLONE_DIR" git clone --depth=$(params.depth) $(params.url) "$CLONE_DIR"
cd "$CLONE_DIR"
else else
echo "1" echo "[INFO] Cloning repository..."
cd "$CLONE_DIR" git clone --depth=$(params.depth) $(params.url) "${CLONE_DIR}_"
echo "2" mv "${CLONE_DIR}_/*" "${CLONE_DIR}"
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"
fi fi
cd "$CLONE_DIR"
if [ -n "$(params.refspec)" ]; then if [ -n "$(params.refspec)" ]; then
git fetch origin $(params.refspec) git fetch origin $(params.refspec)
fi fi