version_bump/plugins/git
The git plugin (plugin name “git”).
Mirrors @semantic-release/git. In prepare it stages the release assets
that earlier plugins changed (e.g. the gleam.toml version bumped by hex,
or a CHANGELOG.md) and commits them. Because the engine creates the release
tag after all prepare hooks and pushes the branch alongside the tag, the
tag then points at the commit containing the bump — keeping the committed
version, the tag, and the published version consistent.
List this plugin AFTER the plugins that modify files (e.g. hex). Options
(all optional, with sensible defaults):
assetscomma-separated paths to stage (default “gleam.toml”)messagecommit message template;${version}is substituted (default “chore(release): ${version} [skip ci]”)committerNamecommit author/committer name (default “version_bump”)committerEmailcommit author/committer email
Values
pub fn parse_assets(raw: String) -> List(String)
Parse a comma-separated assets option into a trimmed, non-empty path list.
PURE.
pub fn plugin() -> plugin.Plugin
Build the git plugin: implements only prepare (the commit). The engine
handles creating and pushing the tag and the branch.
pub fn render_message(
template: String,
version: String,
) -> String
Render the commit message, substituting ${version}. PURE.