You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by lx...@apache.org on 2017/08/01 14:35:58 UTC

[incubator-mxnet-test] 10/28: Fix more

This is an automated email from the ASF dual-hosted git repository.

lxn2 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet-test.git

commit ba8eceacd8be8b4c7b4fc214d6ee5d7262b3913c
Author: Wang <wa...@9801a7a9c287.ant.amazon.com>
AuthorDate: Thu Jul 27 13:59:24 2017 -0700

    Fix more
---
 docs/build_version_doc/build_doc.sh | 49 ++++++++++++++++++-------------------
 1 file changed, 24 insertions(+), 25 deletions(-)

diff --git a/docs/build_version_doc/build_doc.sh b/docs/build_version_doc/build_doc.sh
index e3ed027..c83a8b0 100755
--- a/docs/build_version_doc/build_doc.sh
+++ b/docs/build_version_doc/build_doc.sh
@@ -1,18 +1,17 @@
 #!/bin/bash
 
 web_url="https://github.com/kevinthesun/mxnet.git"
-mxnet_url="https://github.com/kevinthesun/mxnet.git"
 web_folder="VersionedWeb"
-mxnet_folder="mxnet"
 local_build="latest"
 web_branch="static_web"
 git clone $web_url $web_folder
-git clone $mxnet_url --recursive $mxnet_folder
 cd $web_folder
 git checkout -b $web_branch "origin/$web_branch"
 cd ..
 mkdir "$local_build"
-cp "$web_folder/tag.txt" tag_list.txt
+
+tag_list_file="docs/build_version_doc/tag_list.txt"
+cp "$web_folder/tag.txt" "$tag_list_file"
 input="tag_list.txt"
 tag_list=()
 while read -r line 
@@ -21,31 +20,26 @@ do
 done < "$input"
 latest_tag=${tag_list[0]}
 echo "latest_tag is: $latest_tag"
-
-mkdir master
-cd "$mxnet_folder"
-git checkout VersionedDoc
 commit_id=$(git rev-parse HEAD)
-curr_tag=$(git describe --exact-match --tags "$commit_id")
-if [[ "$curr_tag" != fatal* ]] && [ $curr_tag != $latest_tag ]
+if [[ -z "${TAG}" ]]
 then
-    latest_tag=$curr_tag
-fi
-make docs || exit 1
-cd ..
-if [ $latest_tag != ${tag_list[0]} ]
+    curr_tag=''
+else
+    curr_tag='${TAG:4}'
+if [[ "$curr_tag" != '' ]] && [ $curr_tag != $latest_tag ]
 then
-    echo -e "$latest_tag\n$(cat tag_list.txt)" > tag_list.txt
-    cat tag_list.txt
+    latest_tag=$curr_tag
 fi
-python AddVersion.py --file_path "$mxnet_folder/docs/_build/html/"
-cp -a "$mxnet_folder/docs/_build/html/." master
-
 if [ $latest_tag != ${tag_list[0]} ]
 then
-    python AddVersion.py --file_path "$mxnet_folder/docs/_build/html/" --current_version "$latest_tag"
-    cp -a "$mxnet_folder/docs/_build/html/." "$local_build"
-    cp tag_list.txt "$local_build/tag.txt"
+    make docs || exit 1
+    echo -e "$latest_tag\n$(cat $tag_list_file)" > "$tag_list_file"
+    cat $tag_list_file
+    cd "docs/build_version_doc"
+    python AddVersion.py --file_path "$mxnet_folder/docs/_build/html/"
+    cd ../..
+    cp -a "docs/_build/html/." "$local_build"
+    cp $tag_list_file "$local_build/tag.txt"
     cp -a "$web_folder/versions/." "$local_build/versions"
     mkdir "$local_build/versions/${tag_list[0]}"
     cp -a "$web_folder/." "$local_build/versions/${tag_list[0]}"
@@ -54,12 +48,17 @@ then
     cp -a "$local_build/." "$web_folder"
 fi
 
-rm -rf "$web_folder/versions/master"
-cp -R master "$web_folder/versions/master"
+git checkout master
+git submodule update
+make docs || exit 1
+
+rm -rfv "$web_folder/versions/master/*"
+cp -a "docs/_build/html/." "$web_folder/versions/master"
 
 if [ $latest_tag != ${tag_list[0]} ]
 then
     total=${#tag_list[*]}
+    cd "docs/build_version_doc"
     for (( i=0; i<=$(( $total -1 )); i++ ))
     do
         python AddVersion.py --file_path "$web_folder/versions/${tag_list[$i]}" \

-- 
To stop receiving notification emails like this one, please contact
"commits@mxnet.apache.org" <co...@mxnet.apache.org>.