Documentation
¶
Index ¶
- Constants
- func CommitHash() string
- func CommitHashFromGit(path string) (string, error)
- func FromGit(path, appName string) (string, error)
- func FullVersion() string
- func FullVersionFromGit(path, appName string) (string, error)
- func SetCommitHash(hash string)
- func SetCommitHashFromGit(path string) error
- func SetFromGit(path, appName string) error
- func SetVersion(ver string)
- func SetVersionFromGit(path, appName string) error
- func Version() string
Constants ¶
const ( // DefaultHash is the default hash if there is no hash provided. DefaultHash = "dev" // DefaultVersion is the default version if there is no hash provided. DefaultVersion = "1.15.0" )
Variables ¶
This section is empty.
Functions ¶
func CommitHash ¶
func CommitHash() string
CommitHash returns a string representing the current commitHash.
func CommitHashFromGit ¶
CommitHashFromGit returns the commit hash from the last git.
func FullVersion ¶
func FullVersion() string
FullVersion returns a string representing the version and commit hash concatenated separated by a '-'.
Returns only the version if the commit hash is not defined.
func FullVersionFromGit ¶
FullVersionFromGit returns the full version from the last git.
func SetCommitHash ¶
func SetCommitHash(hash string)
SetCommitHash sets the commit hash of the application to the value provided as hash. Empty values are accepted.
func SetCommitHashFromGit ¶
SetCommitHashFromGit sets the commit hash from the last git.
func SetFromGit ¶
SetFromGit sets the commit hash and the version from the last git.
func SetVersion ¶
func SetVersion(ver string)
SetVersion sets the version to tha value provided as ver unless ver is empty.
func SetVersionFromGit ¶
SetVersionFromGit sets the version from the last git.
Types ¶
This section is empty.