From 187cf6f0c6e973327319c12c6fb79b0bfe5b0565 Mon Sep 17 00:00:00 2001 From: Ryota MIBU Date: Fri, 12 Feb 2016 18:36:22 +0900 Subject: [PATCH] script: fix auto feature config builder Change-Id: Ifa7249ceed9f803e3bb7fbe79caa05705e7fd42f Signed-off-by: Ryota MIBU (cherry picked from commit e0a0a51fd5a903f184be9bf78051b8bec4ab6a2a) --- build-composite.sh | 25 ++++++++++++++----------- docs/configguide/feature-config.rst | 2 ++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/build-composite.sh b/build-composite.sh index 4264b8d8b..714bd5bbc 100755 --- a/build-composite.sh +++ b/build-composite.sh @@ -22,17 +22,17 @@ get_repo_names() { # so we have the repo name list here to add project docs # one by one. This will be replaced by the list in project.cfg . # grep -v '^#' releng/jjb/opnfvdocs/project.cfg | sort - echo "sdnvpn" + echo "apex" + echo "copper" + echo "doctor" + echo "fastpathmetrics" echo "fuel" + echo "functest" echo "ipv6" echo "joid" - echo "functest" - echo "apex" echo "promise" - echo "copper" - echo "doctor" + echo "sdnvpn" echo "vswitchperf" - echo "fastpathmetrics" } git_clone() { @@ -90,17 +90,20 @@ userguide/feature-usage.rst for guide in $targets do mainfile="$WORKSPACE/docs/$guide" + basefilename=$(basename ${guide/-/}) for repo in $repos do - projectfile="projects/$repo/${guide//-/}" - projectlink="${mainfile%/*}/featureconfig-$repo.rst" - [[ -e "$WORKSPACE/docs/$projectfile" ]] || continue + targetfile="$WORKSPACE/docs/projects/$repo/${guide/-/}" + targetlink="../projects/$repo/${guide/-/}" + projectfilename="${basefilename/.rst/-$repo.rst}" + projectfile="$(dirname $mainfile)/$projectfilename" + [[ -e "$targetfile" ]] || continue echo "Adding $repo to $guide ..." echo "" >> $mainfile echo ".. toctree::" >> $mainfile echo "" >> $mainfile - echo " $projectlink" >> $mainfile - echo ".. include:: ../$projectfile" >> $projectlink + echo " $projectfilename" >> $mainfile + echo ".. include:: $targetlink" > $projectfile done echo echo "Generated $guide:" diff --git a/docs/configguide/feature-config.rst b/docs/configguide/feature-config.rst index 29e7e09cf..f40bff22c 100644 --- a/docs/configguide/feature-config.rst +++ b/docs/configguide/feature-config.rst @@ -8,3 +8,5 @@ Feature Configuration The following sections describe the configuration options for specific platform features provided in Brahmaputra. Further details for each feature are captured in the referred project documentation. + +.. /docs/configguide/featureconfig.rst files will be imported below by the build script. -- 2.16.6