init
This commit is contained in:
parent
19f55a8831
commit
e84b1069bc
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user