diff options
Diffstat (limited to 'integrations/gen_docs_integrations.py')
-rw-r--r-- | integrations/gen_docs_integrations.py | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/integrations/gen_docs_integrations.py b/integrations/gen_docs_integrations.py index b52500bdda..caceb9cc9c 100644 --- a/integrations/gen_docs_integrations.py +++ b/integrations/gen_docs_integrations.py @@ -5,30 +5,26 @@ import re # Dictionary responsible for making the symbolic links at the end of the script's run. symlink_dict = {} -am_i_inside_go = "go.d.plugin" in str(Path.cwd()) def cleanup(): """ clean directories that are either data collection or exporting integrations """ - if am_i_inside_go: - for element in Path("modules").glob('**/*/'): - if "integrations" in str(element): - shutil.rmtree(element) - else: - for element in Path("src/collectors").glob('**/*/'): - # print(element) - if "integrations" in str(element): - shutil.rmtree(element) - - for element in Path("src/exporting").glob('**/*/'): - if "integrations" in str(element): - shutil.rmtree(element) - for element in Path("integrations/cloud-notifications").glob('**/*/'): - if "integrations" in str(element) and not "metadata.yaml" in str(element): - shutil.rmtree(element) - + for element in Path("src/go/collectors/go.d.plugin/modules").glob('**/*/'): + if "integrations" in str(element): + shutil.rmtree(element) + for element in Path("src/collectors").glob('**/*/'): + # print(element) + if "integrations" in str(element): + shutil.rmtree(element) + + for element in Path("src/exporting").glob('**/*/'): + if "integrations" in str(element): + shutil.rmtree(element) + for element in Path("integrations/cloud-notifications").glob('**/*/'): + if "integrations" in str(element) and not "metadata.yaml" in str(element): + shutil.rmtree(element) def generate_category_from_name(category_fragment, category_array): """ @@ -368,7 +364,7 @@ for integration in integrations: path = build_path(meta_yaml) write_to_file(path, md, meta_yaml, sidebar_label, community) - elif not am_i_inside_go: + else: # kind of specific if clause, so we can avoid running excessive code in the go repo if integration['integration_type'] == "exporter": |