Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main: update version output #233

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading