def replace_text_in_file()

in scripts/copy_druid_docs.py [0:0]


def replace_text_in_file(destination_directory, druid_version):
    """
    Find/replace {{DRUIDVERSION}} with the actual version
    """

    with open(destination_directory, 'r') as file:
        file_content = file.read()

    modified_content = file_content.replace(druid_variable, druid_version)

    with open(destination_directory, 'w') as file:
        file.write(modified_content)