Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultTemplate = "{{if .Dirty}}dirty-{{.User}}-{{end}}{{.Commits}}.{{.Hash}}"
DefaultTemplate Default template for formatting GitVersion using String()
Variables ¶
This section is empty.
Functions ¶
func GitProjectPaths ¶
GitProjectPaths gives absolute paths given project paths relative to the git root
func GitRootPath ¶
GitRootPath retrieves the absolute path of the root of this versioned git tree
func SetWorkingDir ¶
func SetWorkingDir(dir string)
SetWorkingDir sets the working directory for running git commands
Types ¶
type GitVersion ¶
GitVersion version information about one or more git projects
func New ¶
func New(paths []string) (*GitVersion, error)
New creates a new GitVersion for the specified paths
func (*GitVersion) FormatTemplate ¶
func (ver *GitVersion) FormatTemplate(templateString string) (string, error)
FormatTemplate formats a GitVersion using a text/template string
func (*GitVersion) String ¶
func (ver *GitVersion) String() string
Click to show internal directories.
Click to hide internal directories.