diff --git a/CHANGELOG.md b/CHANGELOG.md index 8950b44..ba8e016 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [v0.1.0](https://github.com/allenai/beaker-py/releases/tag/v0.1.0) - 2021-11-19 + ### Added - Added `Beaker` client class. diff --git a/scripts/prepare_changelog.py b/scripts/prepare_changelog.py index b7d25c5..073e9cc 100644 --- a/scripts/prepare_changelog.py +++ b/scripts/prepare_changelog.py @@ -10,7 +10,7 @@ def main(): with changelog.open() as f: lines = f.readlines() - insert_index: int + insert_index: int = -1 for i in range(len(lines)): line = lines[i] if line.startswith("## Unreleased"): @@ -20,7 +20,8 @@ def main(): return elif line.startswith("## [v"): break - else: + + if insert_index < 0: raise RuntimeError("Couldn't find 'Unreleased' section") lines.insert(insert_index, "\n")