diff --git a/docs/golden_stick/docs/source_en/conf.py b/docs/golden_stick/docs/source_en/conf.py index 8a9477915c9ad824a91b2b66d3fa5c2175f6f892..675b79100dbf92114e4f6c91d7ce19ed44f59352 100644 --- a/docs/golden_stick/docs/source_en/conf.py +++ b/docs/golden_stick/docs/source_en/conf.py @@ -176,11 +176,11 @@ try: except: print('golden_stick替换安装包内容失败') -re_url = r"(((gitee.com/mindspore/docs/mindspore-lite)|(github.com/mindspore-ai/(mindspore|docs))|" + \ +re_url = r"(((gitee.com/mindspore/docs)|(github.com/mindspore-ai/(mindspore|docs))|" + \ r"(mindspore.cn/(docs|tutorials|lite))|(obs.dualstack.cn-north-4.myhuaweicloud)|" + \ r"(mindspore-website.obs.cn-north-4.myhuaweicloud))[\w\d/_.-]*?)/(master)" -re_url2 = r"(gitee.com/mindspore/mindspore/[\w\d/_.-]*?)/(master)" +re_url2 = r"(gitee.com/mindspore/(mindspore|mindspore-lite)/[\w\d/_.-]*?)/(master)" re_url3 = r"(((gitee.com/mindspore/golden-stick)|(mindspore.cn/golden_stick))/[\w\d/_.-]*?)/(master)" diff --git a/docs/golden_stick/docs/source_zh_cn/conf.py b/docs/golden_stick/docs/source_zh_cn/conf.py index c04f490f1641d6773c646bf62d3f3f71ad654bb7..c1cfb44b3ae24908d5de88c65c67d4204e78741e 100644 --- a/docs/golden_stick/docs/source_zh_cn/conf.py +++ b/docs/golden_stick/docs/source_zh_cn/conf.py @@ -346,11 +346,11 @@ docs_branch = [version_inf[i]['branch'] for i in range(len(version_inf)) if vers re_view = f"\n.. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/{docs_branch}/" + \ f"resource/_static/logo_source.svg\n :target: https://gitee.com/mindspore/{copy_repo}/blob/{branch}/" -re_url = r"(((gitee.com/mindspore/docs/mindspore-lite)|(github.com/mindspore-ai/(mindspore|docs))|" + \ +re_url = r"(((gitee.com/mindspore/docs)|(github.com/mindspore-ai/(mindspore|docs))|" + \ r"(mindspore.cn/(docs|tutorials|lite))|(obs.dualstack.cn-north-4.myhuaweicloud)|" + \ r"(mindspore-website.obs.cn-north-4.myhuaweicloud))[\w\d/_.-]*?)/(master)" -re_url2 = r"(gitee.com/mindspore/mindspore/[\w\d/_.-]*?)/(master)" +re_url2 = r"(gitee.com/mindspore/(mindspore|mindspore-lite)/[\w\d/_.-]*?)/(master)" re_url3 = r"(((gitee.com/mindspore/golden-stick)|(mindspore.cn/golden_stick))/[\w\d/_.-]*?)/(master)" diff --git a/docs/lite/api/source_en/conf.py b/docs/lite/api/source_en/conf.py index a052d9674f6c9308d0ee19c8b75b429b6acc38ad..24e1c26af03c0580065bb459dab5a5dba0c6b194 100644 --- a/docs/lite/api/source_en/conf.py +++ b/docs/lite/api/source_en/conf.py @@ -336,11 +336,11 @@ except: # 发版本时这里启用 # modify urls -re_url = r"(((gitee.com/mindspore/docs/mindspore-lite)|(github.com/mindspore-ai/(mindspore|docs))|" + \ +re_url = r"(((gitee.com/mindspore/docs)|(github.com/mindspore-ai/(mindspore|docs))|" + \ r"(mindspore.cn/(docs|tutorials|lite))|(obs.dualstack.cn-north-4.myhuaweicloud)|" + \ r"(mindspore-website.obs.cn-north-4.myhuaweicloud))[\w\d/_.-]*?)/(master)" -re_url2 = r"(gitee.com/mindspore/mindspore/[\w\d/_.-]*?)/(master)" +re_url2 = r"(gitee.com/mindspore/(mindspore|mindspore-lite)/[\w\d/_.-]*?)/(master)" re_url3 = r"(((gitee.com/mindspore/golden-stick)|(mindspore.cn/golden_stick))/[\w\d/_.-]*?)/(master)" diff --git a/docs/lite/api/source_zh_cn/conf.py b/docs/lite/api/source_zh_cn/conf.py index e693ef86eb107db9ba1a489be830ae8b57dcf461..49431f26a6c35c00d28022370bc8103ea35e5709 100644 --- a/docs/lite/api/source_zh_cn/conf.py +++ b/docs/lite/api/source_zh_cn/conf.py @@ -235,11 +235,11 @@ re_view = f"\n.. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud. # 发版本时这里启用 # modify urls -re_url = r"(((gitee.com/mindspore/docs/mindspore-lite)|(github.com/mindspore-ai/(mindspore|docs))|" + \ +re_url = r"(((gitee.com/mindspore/docs)|(github.com/mindspore-ai/(mindspore|docs))|" + \ r"(mindspore.cn/(docs|tutorials|lite))|(obs.dualstack.cn-north-4.myhuaweicloud)|" + \ r"(mindspore-website.obs.cn-north-4.myhuaweicloud))[\w\d/_.-]*?)/(master)" -re_url2 = r"(gitee.com/mindspore/mindspore/[\w\d/_.-]*?)/(master)" +re_url2 = r"(gitee.com/mindspore/(mindspore|mindspore-lite)/[\w\d/_.-]*?)/(master)" re_url3 = r"(((gitee.com/mindspore/golden-stick)|(mindspore.cn/golden_stick))/[\w\d/_.-]*?)/(master)" diff --git a/docs/mindspore/source_en/conf.py b/docs/mindspore/source_en/conf.py index c4fd58aaddae0fcd2699aa7a0d9b39cde257a64f..6714c5402124256c427bf60df2ba753b9826abae 100644 --- a/docs/mindspore/source_en/conf.py +++ b/docs/mindspore/source_en/conf.py @@ -300,11 +300,11 @@ sys.path.append(os.path.abspath('../../../resource/search')) import search_code # 发版本时这里启用 -re_url = r"(((gitee.com/mindspore/docs/mindspore-lite)|(github.com/mindspore-ai/(mindspore|docs))|" + \ +re_url = r"(((gitee.com/mindspore/docs)|(github.com/mindspore-ai/(mindspore|docs))|" + \ r"(mindspore.cn/(docs|tutorials|lite))|(obs.dualstack.cn-north-4.myhuaweicloud)|" + \ r"(mindspore-website.obs.cn-north-4.myhuaweicloud))[\w\d/_.-]*?)/(master)" -re_url2 = r"(gitee.com/mindspore/mindspore/[\w\d/_.-]*?)/(master)" +re_url2 = r"(gitee.com/mindspore/(mindspore|mindspore-lite)/[\w\d/_.-]*?)/(master)" re_url3 = r"(((gitee.com/mindspore/golden-stick)|(mindspore.cn/golden_stick))/[\w\d/_.-]*?)/(master)" diff --git a/docs/mindspore/source_zh_cn/conf.py b/docs/mindspore/source_zh_cn/conf.py index be9299e14e710bf6505bbbc6c971db3ff19022a1..a56027ee3b076e8e12b575452e6fda739f82a412 100644 --- a/docs/mindspore/source_zh_cn/conf.py +++ b/docs/mindspore/source_zh_cn/conf.py @@ -361,11 +361,11 @@ for root, dirs, files in os.walk(api_file_dir, topdown=True): import json # 发版本时这里启用 -re_url = r"(((gitee.com/mindspore/docs/mindspore-lite)|(github.com/mindspore-ai/(mindspore|docs))|" + \ +re_url = r"(((gitee.com/mindspore/docs)|(github.com/mindspore-ai/(mindspore|docs))|" + \ r"(mindspore.cn/(docs|tutorials|lite))|(obs.dualstack.cn-north-4.myhuaweicloud)|" + \ r"(mindspore-website.obs.cn-north-4.myhuaweicloud))[\w\d/_.-]*?)/(master)" -re_url2 = r"(gitee.com/mindspore/mindspore/[\w\d/_.-]*?)/(master)" +re_url2 = r"(gitee.com/mindspore/(mindspore|mindspore-lite)/[\w\d/_.-]*?)/(master)" re_url3 = r"(((gitee.com/mindspore/golden-stick)|(mindspore.cn/golden_stick))/[\w\d/_.-]*?)/(master)" @@ -405,7 +405,6 @@ for cur, _, files in os.walk(des_sir): new_content = content # 发版本时这里启用 new_content = re.sub(re_url, r'\1/r2.7.0', new_content) - new_content = re.sub(re_url2, r'\1/v2.7.0', new_content) new_content = re.sub(re_url3, r'\1/r1.2.0', new_content) new_content = re.sub(re_url4, r'\1/r0.3.0', new_content) new_content = re.sub(re_url5, r'\1/81RC1', new_content)