MCPcopy Create free account
hub / github.com/apache/burr / _validate_version

Function _validate_version

scripts/apache_release.py:210–221  ·  view source on GitHub ↗

Validate that requested version matches pyproject.toml.

(requested_version: str)

Source from the content-addressed store, hash-verified

208
209
210def _validate_version(requested_version: str) -> bool:
211 """Validate that requested version matches pyproject.toml."""
212 current_version = _get_version_from_file(VERSION_FILE)
213 if current_version != requested_version:
214 _fail(
215 f"Version mismatch!\n"
216 f" Requested: {requested_version}\n"
217 f" In {VERSION_FILE}: {current_version}\n"
218 f"Please update {VERSION_FILE} to {requested_version} first."
219 )
220 print(f"✓ Version validated: {requested_version}\n")
221 return True
222
223
224def _check_git_working_tree() -> None:

Callers 4

cmd_archiveFunction · 0.85
cmd_sdistFunction · 0.85
cmd_wheelFunction · 0.85
cmd_allFunction · 0.85

Calls 2

_get_version_from_fileFunction · 0.85
_failFunction · 0.70

Tested by

no test coverage detected