version

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
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 = "0.0.0"
)

Variables

This section is empty.

Functions

func CommitHash

func CommitHash() string

CommitHash returns a string representing the current commitHash

func CommitHashFromGit

func CommitHashFromGit(path string) (string, error)

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

func FullVersionFromGit(path, appName string) (string, error)

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

func SetCommitHashFromGit(path string) error

func SetFromGit

func SetFromGit(path, appName string) error

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

func SetVersionFromGit(path, appName string) error

func Version

func Version() string

Version returns a string representing the current version

func VersionFromGit

func VersionFromGit(path, appName string) (string, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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