Skip to content

Commit

Permalink
{CI} Update the --dependent-file parameter to be an optional argument…
Browse files Browse the repository at this point in the history
… to avoid introducing a breaking change. (Azure#6521)
  • Loading branch information
wangzelin007 authored Jul 17, 2023
1 parent 332a2b6 commit b442cf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions scripts/ci/index_ref_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,15 @@ def test(self):
if dep_url.get(ext_name):
dep_file = get_whl_from_url(dep_url[ext_name][0], dep_url[ext_name][1], self.whl_dir)
else:
dep_file = ''
dep_file = None
ext_file = get_whl_from_url(ext_url, filename, self.whl_dir)
ref_doc_out_dir = os.path.join(REF_DOC_OUT_DIR, ext_name)
if not os.path.isdir(ref_doc_out_dir):
os.mkdir(ref_doc_out_dir)
script_args = [sys.executable, REF_GEN_SCRIPT, '--extension-file', ext_file, '--output-dir',
ref_doc_out_dir, '--dependent-file', dep_file]
ref_doc_out_dir]
if dep_file:
script_args.extend(['--dependent-file', dep_file])
try:
check_call(script_args)
except CalledProcessError as e:
Expand Down
2 changes: 1 addition & 1 deletion scripts/refdoc/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ def _type_path(val):
parser.add_argument('-o', '--output-dir', dest='output_dir',
help='Path to place the generated documentation. By default, a temporary directory will be created.', required=False, type=_type_path)
parser.add_argument('-d', '--dependent-file', dest='dep_file',
help='Path to the dependent extension .whl file.', required=True, type=str)
help='Path to the dependent extension .whl file.', required=False, type=str)
args = parser.parse_args()
generate(args.ext_file, args.output_dir, args.dep_file)

0 comments on commit b442cf0

Please sign in to comment.