diff --git a/scripts/release_scripts/increment_version.py b/scripts/release_scripts/increment_version.py index cd01471..30c073a 100644 --- a/scripts/release_scripts/increment_version.py +++ b/scripts/release_scripts/increment_version.py @@ -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: