X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=docs%2Fscripts%2Fpublish-docs.sh;h=bd1a9eae3b3bd3ec6e48f46053e369fc67dc9377;hb=573f44c2f5c883753bc9880eead1bd662586521d;hp=0a81dc07212032671f314de53b8616d0989f53c6;hpb=73f725c63c4924b29ebd54a78208b93114183d06;p=vpp.git diff --git a/docs/scripts/publish-docs.sh b/docs/scripts/publish-docs.sh index 0a81dc07212..bd1a9eae3b3 100755 --- a/docs/scripts/publish-docs.sh +++ b/docs/scripts/publish-docs.sh @@ -29,11 +29,13 @@ SITE_USERNAME=$1 VPP_BRANCH=$2 #Build the docs +make docs-clean make docs-venv make docs # Clone the site repo rm -fr site +rm -fr sphinx_env git clone ssh://git@github.com/$SITE_USERNAME/site cd site git submodule update --init --recursive @@ -46,24 +48,34 @@ git merge -m "Publish the Docs" upstream/master VERSION=`source $WS_ROOT/src/scripts/version` VERSION=${VERSION/"~"/"-"} -# Create a branch for the commit -git checkout -b $VERSION -git branch - # Copy the files to the appropriate directory SRC_DIR=../docs/_build/html/. if [ "$VPP_BRANCH" == "master" ] then TARGET_DIR=./static/docs/vpp/master - rm -fr ./static/docs/vpp/master + rm -fr $TARGET_DIR else TARGET_DIR=./static/docs/vpp/v$VPP_BRANCH - rm -fr ./static/docs/vpp/$TARGET_DIR - mkdir -p ./static/docs/vpp/$TARGET_DIR + rm -fr $TARGET_DIR + mkdir -p $TARGET_DIR + VERSION=v$VPP_BRANCH + ln -s $VERSION ./static/docs/vpp/latest fi +# Create a branch for the commit +git checkout -b $VERSION +git branch + +# Copy the docs cp -r $SRC_DIR $TARGET_DIR +# Create the feature list +pushd .. +source ./sphinx_venv/bin/activate +find . -name FEATURE.yaml | ./src/scripts/fts.py --markdown > site/content/vppProject/vppfeatures/features.md +deactivate +popd + # Push the new docs git add "*" git commit -s -m "Publish docs from VPP $VERSION"