Skip to content

Commit

Permalink
main: update version output
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm committed Sep 20, 2024
1 parent 372aef8 commit 640c022
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/atlas-action/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
var (
// version holds atlas-action version. When built with cloud packages should be set by build flag, e.g.
// "-X 'main.version=v0.1.2'"
version string
version string = "v0.0.0"
// commit holds the git commit hash. When built with cloud packages should be set by build flag, e.g.
// "-X 'main.commit=abcdef1234'"
commit string = "dev"
Expand Down Expand Up @@ -52,7 +52,7 @@ type VersionFlag bool

// BeforeReset writes the version variable and terminates with a 0 exit status.
func (v VersionFlag) BeforeReset(app *kong.Kong) error {
_, err := fmt.Fprintf(app.Stdout, "%s-%s\n", version, commit)
_, err := fmt.Fprintf(app.Stdout, "atlas-action version %s-%s\n", version, commit)
app.Exit(0)
return err
}
Expand Down

0 comments on commit 640c022

Please sign in to comment.