5 # This sccript is used to publish the VPP User documents to
10 # $1: The main site repo user name
11 # $2: The release branch name for example 1908, 1904 etc.
14 if [ ! -d "docs" ]; then
15 echo "This script is meant to be run from the root directory."
19 if [ "$#" -ne 2 ]; then
20 echo "Please specify the site username and branch."
24 # Get the workspace root
27 # Get the VPP branch and username
38 git clone ssh://git@github.com/$SITE_USERNAME/site
40 git submodule update --init --recursive
41 git remote add upstream ssh://git@github.com/FDio/site
44 git merge -m "Publish the Docs" upstream/master
47 VERSION=`source $WS_ROOT/src/scripts/version`
48 VERSION=${VERSION/"~"/"-"}
50 # Copy the files to the appropriate directory
51 SRC_DIR=../docs/_build/html/.
52 if [ "$VPP_BRANCH" == "master" ]
54 TARGET_DIR=./static/docs/vpp/master
57 TARGET_DIR=./static/docs/vpp/v$VPP_BRANCH
61 ln -s $VERSION ./static/docs/vpp/latest
64 # Create a branch for the commit
65 git checkout -b $VERSION
69 cp -r $SRC_DIR $TARGET_DIR
73 #git commit -s -m "Publish docs from VPP $VERSION"
74 #git push origin "$VERSION"