зеркало из
1
0
Форкнуть 0
This commit is contained in:
Yuchao Yan 2024-07-11 10:06:54 +08:00 коммит произвёл GitHub
Родитель 7b2584ec38
Коммит fb5c7238bf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -91,7 +91,7 @@ def after_multiapi_combiner(sdk_code_path: str, package_name: str, folder_name:
_LOGGER.info(f"do not find {toml_file}")
def del_outdated_samples(readme: str):
def del_outdated_files(readme: str):
python_readme = Path(readme).parent / "readme.python.md"
if not python_readme.exists():
_LOGGER.info(f"do not find python configuration: {python_readme}")
@ -102,6 +102,12 @@ def del_outdated_samples(readme: str):
sdk_folder = extract_sdk_folder(content)
is_multiapi = is_multiapi_package(content)
if sdk_folder:
# remove tsp-location.yaml
tsp_location = Path(f"sdk/{sdk_folder}/tsp-location.yaml")
if tsp_location.exists():
os.remove(str(tsp_location))
_LOGGER.info(f"remove tsp-location.yaml: {tsp_location}")
# remove generated_samples
sample_folder = Path(f"sdk/{sdk_folder}/generated_samples")
if sample_folder.exists():
# rdbms is generated from different swagger folder;multiapi package may don't generate every time
@ -272,7 +278,7 @@ def main(generate_input, generate_output):
if "resource-manager" in input_readme:
relative_path_readme = str(Path(spec_folder, input_readme))
update_metadata_for_multiapi_package(spec_folder, input_readme)
del_outdated_samples(relative_path_readme)
del_outdated_files(relative_path_readme)
config = generate(
CONFIG_FILE,
sdk_folder,