Fix
authorWang <wayao@9801a7a9c287.ant.amazon.com>
Tue, 1 Aug 2017 21:23:40 +0000 (14:23 -0700)
committerNguyen <lynguyen@amazon.com>
Tue, 1 Aug 2017 21:29:02 +0000 (14:29 -0700)
docs/build_version_doc/AddVersion.py
docs/build_version_doc/build_doc.sh

index 6a75dac..d029376 100644 (file)
@@ -8,11 +8,13 @@ parser.add_argument('--file_path', type=str, default='mxnet/docs/_build/html/',
                         help='file to be modified')
 parser.add_argument('--current_version', type=str, default='master',
                         help='Current version')
+parser.add_argument('--root_url', type=str, default='https://mxnet.io',
+                        help='Current version')
 
 if __name__ == '__main__':
     args = parser.parse_args()
 
-    root_url = "http://localhost:8008/"#"https://mxnet.incubator.apache.org/test/"
+    root_url = args.root_url
     tag_list = list()
     with open('tag_list.txt', 'r') as tag_file:
         for line in tag_file:
index 1fefaf2..95a6867 100755 (executable)
@@ -39,12 +39,17 @@ then
     echo -e "$latest_tag\n$(cat $tag_list_file)" > "$tag_list_file"
     cat $tag_list_file
 <<<<<<< HEAD
+<<<<<<< HEAD
     #cd "docs/build_version_doc"
     tests/ci_build/ci_build.sh doc python docs/build_version_doc/AddVersion.py
     #cd ../..
 =======
     python docs/build_version_doc/AddVersion.py --file_path "docs/_build/html/" --current_version "$latest_tag"
 >>>>>>> d53dfab... Change addversion path
+=======
+    python docs/build_version_doc/AddVersion.py --file_path "docs/_build/html/" --current_version "$latest_tag" \
+                                                --root_url "http://mxnet.incubator.apache.org/test/"
+>>>>>>> 2635d3d... Fix
     cp -a "docs/_build/html/." "$local_build"
     cp $tag_list_file "$local_build/tag.txt"
     rm -rf "$web_folder/.git"
@@ -65,7 +70,7 @@ make docs || exit 1
 
 rm -rfv "$web_folder/versions/master/*"
 cp -a "docs/_build/html/." "$web_folder/versions/master"
-python docs/build_version_doc/AddVersion.py --file_path "$web_folder/versions/master"
+python docs/build_version_doc/AddVersion.py --file_path "$web_folder/versions/master" --root_url "http://mxnet.incubator.apache.org/test/"
 
 # Update version list for all previous version website
 if [ $latest_tag != ${tag_list[0]} ]
@@ -74,6 +79,6 @@ then
     for (( i=0; i<=$(( $total -1 )); i++ ))
     do
         python docs/build_version_doc/AddVersion.py --file_path "$web_folder/versions/${tag_list[$i]}" \
-                             --current_version "${tag_list[$i]}"
+                                                    --current_version "${tag_list[$i]}" --root_url "http://mxnet.incubator.apache.org/test/"
     done
 fi