Versioce.Git (Versioce v1.1.2) View Source

Git utility functions for versioce module.

Link to this section Summary

Functions

Stage files.

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.

Create a tag.

Link to this section Functions

Specs

add([String.t()]) :: String.t()

Stage files.

Specs

commit(String.t()) :: String.t()

Make a commit with a message.

Link to this function

get_commit_messages_in_range(hash1, hash2)

View Source

Specs

get_commit_messages_in_range(String.t(), String.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)

View Source

Specs

get_message_from_hash(String.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.

Specs

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

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

Specs

initial_commit() :: String.t()

Get initial commit hash.

Specs

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

Get git repository.

Specs

tag(String.t(), String.t()) :: String.t()

Create a tag.