semantic_release.cli.commands.version module¶
- semantic_release.cli.commands.version.apply_version_to_source_files(repo_dir: Path, version_declarations: Iterable[VersionDeclarationABC], version: Version, noop: bool = False) list[str] [source]¶
- semantic_release.cli.commands.version.build_distributions(build_command: str | None, build_command_env: Mapping[str, str] | None = None, noop: bool = False) None [source]¶
Run the build command to build the distributions.
- Parameters:
build_command – The build command to run.
build_command_env – The environment variables to use when running the build command.
noop – Whether or not to run the build command.
- Raises:
BuildDistributionsError: if the build command fails
- semantic_release.cli.commands.version.is_forced_prerelease(as_prerelease: bool, forced_level_bump: LevelBump | None, prerelease: bool) bool [source]¶
Determine if this release is forced to have prerelease on/off. If
force_prerelease
is set then yes. Otherwise if we are forcing a specific level bump without force_prerelease, it’s False. Otherwise (force_level is None
) use the value ofprerelease
- semantic_release.cli.commands.version.last_released(repo_dir: Path, tag_format: str) tuple[Tag, Version] | None [source]¶
- semantic_release.cli.commands.version.shell(cmd: str, *, env: Mapping[str, str] | None = None, check: bool = True) subprocess.CompletedProcess [source]¶
- semantic_release.cli.commands.version.version_from_forced_level(repo_dir: Path, forced_level_bump: LevelBump, translator: VersionTranslator) Version [source]¶