Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Commit

Permalink
Update version
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Oct 1, 2019
1 parent 4c9c88a commit 81d7511
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ func mod() string {
return ""
}

// version returns app version based on git tag
func version() string {
return strings.TrimLeft(tag(), "v")
}

// tag returns the git tag for the current branch or "" if none.
func tag() string {
s, _ := sh.Output("bash", "-c", "git describe --abbrev=0 --tags 2> /dev/null")
Expand Down Expand Up @@ -157,7 +162,7 @@ func versionInfo() error {
Version string
}{
Package: mod(),
Version: tag(),
Version: version(),
})
}

Expand Down

0 comments on commit 81d7511

Please sign in to comment.