Skip to content

Commit 3f985c3

Browse files
committed
ci: update the git repo
1 parent 632f592 commit 3f985c3

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

scripts/update-built-docs.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,24 @@ doDocsUpdate() {
6363
mkdir "$BUILD_DIR"
6464
fi
6565

66-
rm -rfd "$SOURCE_DIR"
67-
6866
if [ "$MODE" != "git" ]; then
67+
rm -rfd "$SOURCE_DIR"
6968
if [ ! -d "$SOURCE_DIR" ]; then
7069
mkdir "$SOURCE_DIR"
7170
fi
7271
# Download, extract and move
7372
curl -# -L -o $FOLDER_NAME.tar.gz "$SOURCE_URL"
7473
tar xzvf $FOLDER_NAME.tar.gz --strip-components=1 -C "$SOURCE_DIR" && rm $FOLDER_NAME.tar.gz
7574
else
76-
git clone "$SOURCE_URL" "$SOURCE_DIR"
75+
if [ ! -d "$SOURCE_DIR" ]; then
76+
git clone "$SOURCE_URL" "$SOURCE_DIR"
77+
else
78+
cd "$SOURCE_DIR"
79+
# Update the repo
80+
git fetch --all -p -P
81+
git pull --ff
82+
cd - > /dev/null
83+
fi
7784
fi
7885

7986
du -sh "$SOURCE_DIR"

0 commit comments

Comments
 (0)