Versioce.Git (Versioce v2.0.0) View Source

Git utility functions for versioce module.

Link to this section Summary

Functions

Make a commit with a message.

Get a list of messages from hash1 to hash2 in %{hash: "Commmit hash", message: "Commit message"} format

Get message of a commit by its hash.

Returns a list of tags in %{hash: "Commmit hash", tag: "Tag name"} format

Get initial commit hash.

Get git repository.

Link to this section Functions

Link to this function

add(args \\ ["."], repo \\ repo())

View Source

Specs

Stage files.

Link to this function

commit(message, repo \\ repo())

View Source

Specs

commit(String.t(), Git.Repository.t()) :: String.t()

Make a commit with a message.

Link to this function

get_commit_messages_in_range(hash1, hash2, repo \\ repo())

View Source

Specs

get_commit_messages_in_range(String.t(), String.t(), Git.Repository.t()) :: [
  %{hash: String.t(), message: String.t()}
]

Get a list of messages from hash1 to hash2 in %{hash: "Commmit hash", message: "Commit message"} format

Link to this function

get_message_from_hash(hash, repo \\ repo())

View Source

Specs

get_message_from_hash(String.t(), Git.Repository.t()) :: String.t()

Get message of a commit by its hash.

Link to this function

get_tag_name(version_name)

View Source

Specs

get_tag_name(String.t()) :: String.t()

Generate tag name according to Versioce.Config.Git.tag_template/0.

Link to this function

get_tags(repo \\ repo())

View Source

Specs

get_tags(Git.Repository.t()) :: [%{hash: String.t(), tag: String.t()}]

Returns a list of tags in %{hash: "Commmit hash", tag: "Tag name"} format

Link to this function

initial_commit(repo \\ repo())

View Source

Specs

initial_commit(Git.Repository.t()) :: String.t()

Get initial commit hash.

Specs

repo() :: Git.Repository.t()

Get git repository.

Link to this function

tag(name, message, params \\ [], repo \\ repo())

View Source

Specs

Create a tag.