ExecutableGitService

struct ExecutableGitService

The ExecutableGitService

  • Retrieve value for GitConfigKey

    Declaration

    Swift

    func getValue(for key: GitConfigKey) -> String?

    Parameters

    key

    The GitConfigKey

    Return Value

    The corresponding value if available

  • Retrieve remote URL for Repository

    Declaration

    Swift

    func getRemoteURL(repositoryPath: String) -> String?

    Parameters

    repositoryPath

    The repository path

    Return Value

    The remot URL if available

  • Retrieve latest Tag from repository URL

    Declaration

    Swift

    func getLatestTag(repositoryURL: String) -> String?

    Parameters

    repositoryURL

    The repository URL

    Return Value

    The latest Tag if available

  • Clone Git Repo from URL to Path

    Throws

    If cloning fails

    Declaration

    Swift

    func clone(from url: String, to path: String, branch: GitBranch) throws

    Parameters

    url

    The Git Repo URL

    path

    The Path where the cloned repo should be stored

    branch

    The GitBranch