Skip to content

Commit

Permalink
docs: versioning docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed Jan 3, 2021
1 parent 981f29d commit 8396cbd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions scripts/make-doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ HTML_DIR=${DOC_DIR}/_build/html

# backup the old version's doc as later we do make clean, they all gone.
cd ${HTML_DIR}
rsync -rzvh ./v* ../../bak
rsync -rzvh ./latest ../../bak
rsync -rzvh --ignore-missing-args ./v* ../../bak
rsync -rzvh --ignore-missing-args ./latest ../../bak
cd -

cd ${DOC_DIR} && rm -rf api && pip install -r requirements.txt && make clean && cd -
Expand All @@ -27,11 +27,10 @@ if [[ $1 == "commit" ]]; then
cd -
cd ${HTML_DIR}
rsync -avr . master # sync everything under the root to master/
rsync -avr --exclude=master . "v${JINA_VERSION}" # sync everything under the root to version/
cd -
cd ${DOC_DIR}/bak
rsync -avr ./v* ../_build/html/ --ignore-existing # revert backup back
rsync -avr ./latest ../_build/html/ --ignore-existing # revert backup back
rsync -avr --ignore-missing-args ./v* ../_build/html/ --ignore-existing # revert backup back
rsync -avr --ignore-missing-args ./latest ../_build/html/ --ignore-existing # revert backup back
cd -
cd ${HTML_DIR}
rm -rf bak
Expand All @@ -53,7 +52,7 @@ elif [[ $1 == "release" ]]; then
rsync -avr --exclude=latest . "v${JINA_VERSION}" # sync to versions
cd -
cd ${DOC_DIR}/bak
rsync -avr ./v* ../_build/html/ --ignore-existing # revert backup back
rsync -avr --ignore-missing-args ./v* ../_build/html/ --ignore-existing # revert backup back
cd -
cd ${HTML_DIR}
rm -rf bak
Expand Down

0 comments on commit 8396cbd

Please sign in to comment.