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

chore(cli): set version for root #1376

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Changes from 1 commit
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
9 changes: 6 additions & 3 deletions internal/commands/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package commands
import (
"fmt"

"github.com/bearer/bearer/cmd/bearer/build"
"github.com/bearer/bearer/internal/commands/artifact"
"github.com/bearer/bearer/internal/flag"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -65,12 +66,14 @@ Learn More:
For more examples, tutorials, and to learn more about the project
visit https://docs.bearer.com
`

version := fmt.Sprintf("%s@%s", build.Version, build.CommitSHA)
cmd := &cobra.Command{
Use: "bearer",
Args: cobra.NoArgs,
Use: "bearer",
Args: cobra.NoArgs,
Version: version,
}
cmd.SetUsageTemplate(usageTemplate)

return cmd
}

Expand Down
Loading