Skip to content

Commit b533ee7

Browse files
authored
Handle no existing changelog (#82)
1 parent bbc84a6 commit b533ee7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

collection_prep/cmd/version.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040

4141
def get_last_version(path) -> str:
4242
changelog_path = path / "changelogs" / "changelog.yaml"
43+
if not changelog_path.exists:
44+
# Collection has not been released?
45+
return "0.0.0"
4346
changelog = yaml.load(changelog_path)
4447
return max(changelog["releases"].keys())
4548

0 commit comments

Comments
 (0)