Skip to content

Commit

Permalink
Overwrite changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
amishas157 committed Nov 6, 2024
1 parent 74e5b91 commit 13f2093
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/update_source_data_schema_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
NEW_SCHEMAS_DIR = "schemas"
CHANGELOG_FILEPATH = "changelog/source_data.md"


def read_json_file(filepath: str) -> {}:
with open(filepath, "r") as rfp:
try:
Expand Down Expand Up @@ -191,6 +192,9 @@ def main():
filepath=CHANGELOG_FILEPATH, mode="w", content=new_changelog + "\n\n"
)
write_file(filepath=CHANGELOG_FILEPATH, mode="a", content=existing_changelog)
else:
# Rewrite the changelog since intermediate commits may have overwritten changelog
write_file(filepath=CHANGELOG_FILEPATH, mode="w", content=existing_changelog)


if __name__ == "__main__":
Expand Down

0 comments on commit 13f2093

Please sign in to comment.