version_bump
CLI entrypoint for version_bump, a native Gleam port of semantic-release.
The default invocation runs the full release pipeline against the working
directory (--cwd <path>, default .):
- read every environment variable into a
Dict(String, String) - load configuration from the project (
config.load) - apply CLI overrides (e.g.
--dry-run) - run
engine.runand report the resultingSummary
On error the formatted message is printed and the process exits non-zero.
--version/version prints the tool version; --help/-h prints usage.
Types
The parsed CLI invocation. The default run is Release(cwd, dry_run); the
other variants short-circuit before touching the pipeline. Public so the pure
argument parser can be unit-tested.
pub type Command {
Release(cwd: String, dry_run: Bool)
ShowVersion
ShowHelp
}
Constructors
-
Release(cwd: String, dry_run: Bool) -
ShowVersion -
ShowHelp
Values
pub fn apply_dry_run(
config: config.Config,
dry_run: Bool,
) -> config.Config
Apply the --dry-run flag, only ever turning dry-run on (the flag is an
override, never a way to force a real release when config disables it). Pure,
so it is unit-tested directly.
pub fn parse_args(args: List(String)) -> Result(Command, String)
Classify the raw arguments into a Command. Unknown flags are rejected so
the user gets clear feedback rather than a silent no-op. Pure, so it is
unit-tested directly.