Releaser.Git (releaser v0.0.9)

Copy Markdown View Source

Git helper operations for changelog generation and post-bump hooks.

Summary

Functions

Stages files for commit.

Creates a git commit with the given message.

Returns true if the working tree has uncommitted changes.

Returns the latest git tag, or nil if none.

Returns the list of commits between two refs, optionally scoped to a path.

Reads a file's contents at a given revision, e.g. show("HEAD:apps/foo/mix.exs").

Creates an annotated git tag.

Returns every tag in the repository. Empty list if none or not a git repo.

Functions

add(paths)

Stages files for commit.

commit(message)

Creates a git commit with the given message.

dirty?()

Returns true if the working tree has uncommitted changes.

latest_tag()

Returns the latest git tag, or nil if none.

log(opts \\ [])

Returns the list of commits between two refs, optionally scoped to a path.

Each commit is a map with :hash, :subject, and :body keys.

show(revision_path)

Reads a file's contents at a given revision, e.g. show("HEAD:apps/foo/mix.exs").

Returns {:ok, contents} or :error when the path does not exist at that revision.

tag(tag_name, message \\ nil)

Creates an annotated git tag.

tags()

Returns every tag in the repository. Empty list if none or not a git repo.