OpenAperture.Builder.Git
This module contains functions used for interacting with a git repository, specifically in the context of one cloned from GitHub.
Summary↑
| add(repo, path) | Stages a file to the local git repository |
| add_all(repo, path) | Executes a git add -A for a directory |
| checkout(repo) | Executes a |
| clone(repo) | Clones a remote git repository to a local path |
| commit(repo, message) | Executes a git commit for the local repository |
| get_current_commit_hash(repo) | Retrieves the current git commit hash |
| push(repo) | Executes a git push for a local repository. Uses the default remote |
Functions
Specs:
- add(OpenAperture.Builder.GitRepo.t, String.t) :: :ok | {:error, String.t}
Stages a file to the local git repository.
Specs:
- add_all(OpenAperture.Builder.GitRepo.t, String.t) :: :ok | {:error, String.t}
Executes a git add -A for a directory.
Specs:
- checkout(OpenAperture.Builder.GitRepo.t) :: :ok | {:error, String.t}
Executes a git checkout against a specific branch, tag, or hash.
Specs:
- clone(OpenAperture.Builder.GitRepo.t) :: :ok | {:error, String.t}
Clones a remote git repository to a local path.
Specs:
- commit(OpenAperture.Builder.GitRepo.t, String.t) :: :ok | {:error, String.t}
Executes a git commit for the local repository.
Specs:
- get_current_commit_hash(OpenAperture.Builder.GitRepo.t) :: {:ok, String.t} | {:error, String.t}
Retrieves the current git commit hash
Specs:
- push(OpenAperture.Builder.GitRepo.t) :: :ok | {:error, String.t}
Executes a git push for a local repository. Uses the default remote.