Skip to content

Commit aebd510

Browse files
committed
update
1 parent 914dedf commit aebd510

File tree

1 file changed

+3
-28
lines changed

1 file changed

+3
-28
lines changed

eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -88,36 +88,11 @@ def del_outdated_files(readme: str):
8888
shutil.rmtree(sample_folder)
8989
_LOGGER.info(f"remove sample folder: {sample_folder}")
9090
else:
91-
_LOGGER.info(f"we don't remove sample folder for rdbms package")
91+
_LOGGER.info(f"we don't remove sample folder for rdbms")
9292
else:
9393
_LOGGER.info(f"sample folder does not exist: {sample_folder}")
9494
else:
95-
python_readme = Path(readme).parent / "readme.python.md"
96-
_LOGGER.info(f"do not find valid sdk_folder from readme.python.md: {python_readme}")
97-
98-
99-
# look for fines in tag like:
100-
# ``` yaml $(tag) == 'package-2023-05-01-preview-only'
101-
# input-file:
102-
# - Microsoft.Insights/preview/2023-05-01-preview/tenantActionGroups_API.json
103-
# ```
104-
def get_related_swagger(readme_content: List[str], tag: str) -> List[str]:
105-
result = []
106-
for idx in range(len(readme_content)):
107-
line = readme_content[idx]
108-
if tag in line and "```" in line and "tag" in line and "==" in line and "yaml" in line:
109-
idx += 1
110-
while idx < len(readme_content):
111-
if "```" in readme_content[idx]:
112-
break
113-
if ".json" in readme_content[idx] and (
114-
re.compile(r"\d{4}-\d{1,2}-\d{1,2}").findall(readme_content[idx])
115-
or "Microsoft." in readme_content[idx]
116-
):
117-
result.append(readme_content[idx].strip("\n -"))
118-
idx += 1
119-
break
120-
return result
95+
_LOGGER.info(f"do not find valid sdk_folder in readme.python.md")
12196

12297

12398
def main(generate_input, generate_output):
@@ -412,4 +387,4 @@ def generate_main():
412387

413388

414389
if __name__ == "__main__":
415-
generate_main()
390+
generate_main()

0 commit comments

Comments
 (0)