(path: str, new_version: str)
| 111 | |
| 112 | |
| 113 | def update_docs(path: str, new_version: str): |
| 114 | print(f"updating docs in {path}") |
| 115 | with open(path, 'r+') as fd: |
| 116 | content = fd.read() |
| 117 | fd.seek(0) |
| 118 | content = re.sub(r'datafusion\s*=\s*"(.+?)"', f'datafusion = "{new_version}"', content) |
| 119 | content = re.sub(r'datafusion\s*=\s*\{\s*version\s*=\s*"(.+?)"', f'datafusion = {{ version = "{new_version}"', content) |
| 120 | fd.truncate() |
| 121 | fd.write(content) |
| 122 | |
| 123 | |
| 124 | def main(): |