Skip to content

Commit

Permalink
Update scripts/release_scripts/increment_version.py
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
SafetyQuincyF and coderabbitai[bot] authored Oct 23, 2024
1 parent 7da6fd6 commit 644fee9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/release_scripts/increment_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@

def get_current_version(file_path: str) -> str:
"""Read the current version from the VERSION file."""
with open(file_path, "r") as file:
return file.read().strip()
try:
with open(file_path, "r") as file:
return file.read().strip()
except FileNotFoundError:
raise FileNotFoundError(f"Version file not found: {file_path}")
except IOError as e:
raise IOError(f"Error reading version file: {e}")


def get_last_version_from_changelog(file_path: str) -> str:
Expand Down

0 comments on commit 644fee9

Please sign in to comment.