vcsrepository

package
v1.0.1-0...-0eab957 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectGitRepositoryInformation

func CollectGitRepositoryInformation(dir string, data map[string]string) (map[string]string, error)

CollectGitRepositoryInformation retrieves normalized variables of the git repository

func FindGitReference

func FindGitReference(refType string, refName string) string

FindGitReference returns the unique reference

func FindRepositoryDirectory

func FindRepositoryDirectory(currentDirectory string) string

func GetReferenceByName

func GetReferenceByName(projectDirectory string, refType string, refName string) (string, error)

GetReferenceByName returns a unique identifier for a refType (tag, branch) / reFName (branch name / tag name)

func GetVCSRepositoryInformation

func GetVCSRepositoryInformation(dir string) (map[string]string, error)

GetVCSRepositoryInformation detects the repository type and gathers normalized information from the repository

func GetVCSRepositoryType

func GetVCSRepositoryType(dir string) string

GetVCSRepositoryType returns a short name of the repository type inside the directory (git, svn, unknown)

func IsGitRepository

func IsGitRepository(directory string) bool

IsGitRepository checks if the target directory contains a git repository

Types

type Commit

type Commit struct {
	Message     string
	Description string
}

func FindCommitsBetweenRefs

func FindCommitsBetweenRefs(dir string, startRef string, endRef string) ([]Commit, error)

FindCommitsBetweenRefs finds all git commits between two references

func FindGitCommitsBetweenRefs

func FindGitCommitsBetweenRefs(projectDir string, from string, to string) ([]Commit, error)

FindGitCommitsBetweenRefs finds all git commits between two references, get references via FindGitReference

type Release

type Release struct {
	Name      string
	Reference string
}

func FindLatestGitRelease

func FindLatestGitRelease(projectDir string, from string, stable bool) (Release, error)

func FindLatestRelease

func FindLatestRelease(dir string, startAtReference string) (Release, error)

FindLatestRelease will retrieve the latest release version in the current branch

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL