Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ builds:
goarch: arm64
ldflags:
- -s -w
- -X github.com/quantcli/liftoff-export-cli/cmd.version=v{{ .Version }}

archives:
- formats:
Expand Down
10 changes: 8 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ import (
"github.com/spf13/cobra"
)

// version is overwritten at release time via
// -ldflags "-X github.com/quantcli/liftoff-export-cli/cmd.version=v1.2.0".
// Setting rootCmd.Version below makes cobra register --version for free.
var version = "dev"

var rootCmd = &cobra.Command{
Use: "liftoff-export",
Short: "CLI for the Liftoff fitness app",
Use: "liftoff-export",
Short: "CLI for the Liftoff fitness app",
Version: version,
Long: `liftoff-export reads your personal Liftoff (gymbros.com) workout and
bodyweight data and prints it on stdout. Default output is narrow,
fitdown-style markdown; pass --format json for the full structured row.
Expand Down
Loading