scm-version

Get and write scm version. Codebase scope limited to setuptool-scm codebase

drain_swamp.cli_version.entrypoint_name: str = "scm-version"

Command line entrypoint file name

drain_swamp.cli_version.help_path: str

cli option --path doc string

drain_swamp.cli_version.help_is_write: str

cli option --is-write doc string

drain_swamp.cli_version.help_write_to: str

cli option --write-to doc string

drain_swamp.cli_version.EPILOG_SCM_VERSION_GET: str

Exit codes explanation for command, get

drain_swamp.cli_version.EPILOG_SCM_VERSION_WRITE: str

Exit codes explanation for command, write

drain_swamp.cli_version.main()

scm-version --help, prints help

scm-version COMMAND --help, prints help for a command

Table 14 Commands

command

desc

status

get

Get scm version str

write

Write scm version str to version file

drain_swamp.cli_scm_version.get_scm_version(*args: Any, **kwargs: Any) Any

scm version, setuptools-scm codebase only.

Parameters:
  • path (pathlib.Path) – The root directory [default: pyproject.toml directory]

  • is_write (bool) – Default False. True to write to file otherwise don’t write

  • write_to (str | None) – During testing provide alternative version file path

drain_swamp.cli_scm_version.write_scm_version(*args: Any, **kwargs: Any) Any

Write scm str to version file.

Parameters:
  • scm_ver (str) – version str

  • path (pathlib.Path) – The root directory [default: pyproject.toml directory]

  • write_to (str | None) – During testing provide alternative version file path