You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2017/08/15 00:21:12 UTC
[incubator-mxnet] branch master updated: Fix apache link (#7468)
This is an automated email from the ASF dual-hosted git repository.
jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new b51515f Fix apache link (#7468)
b51515f is described below
commit b51515f29667cd432e18c7b43f086a27f70948bf
Author: Yao Wang <ke...@gmail.com>
AuthorDate: Mon Aug 14 17:21:09 2017 -0700
Fix apache link (#7468)
---
docs/build_version_doc/AddVersion.py | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/docs/build_version_doc/AddVersion.py b/docs/build_version_doc/AddVersion.py
index 34ba40e..c48c630 100755
--- a/docs/build_version_doc/AddVersion.py
+++ b/docs/build_version_doc/AddVersion.py
@@ -64,6 +64,7 @@ if __name__ == '__main__':
'https://github.com/apache/incubator-mxnet/tree/%s/example' % (args.current_version)
navbar = content.find(id="main-nav")
navbar_mobile = content.find(id="burgerMenu")
+ outstr = str(content)
if navbar and navbar_mobile:
version_tag = content.find(id="dropdown-menu-position-anchor-version")
version_tag_mobile = content.find(id="dropdown-menu-position-anchor-version-mobile")
@@ -74,5 +75,17 @@ if __name__ == '__main__':
navbar.append(version_str)
navbar_mobile.append(version_str_mobile)
outstr = str(content).replace('<', '<').replace('>', '>')
- with open(os.path.join(path, name), "w") as outf:
- outf.write(outstr)
+ # Fix link
+ if args.current_version == tag_list[0]:
+ print("Fixing" + os.path.join(path, name))
+ outstr = outstr.replace('https://mxnet.io', 'https://mxnet.incubator.apache.org')
+ outstr = outstr.replace('http://mxnet.io', 'https://mxnet.incubator.apache.org')
+ else:
+ outstr = outstr.replace('https://mxnet.io', 'https://mxnet.incubator.apache.org/'
+ 'versions/%s' % (args.current_version))
+ outstr = outstr.replace('http://mxnet.io', 'https://mxnet.incubator.apache.org/'
+ 'versions/%s' % (args.current_version))
+
+ with open(os.path.join(path, name), "w") as outf:
+ outf.write(outstr)
+
--
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <co...@mxnet.apache.org>'].