Skip to content

Commit

Permalink
fix: Set goreleaser ldflags to package cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
sindrel committed Jun 28, 2023
1 parent 387839b commit 6cad77a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ builds:
- goos: windows
goarch: 386
ldflags:
- -s -w -X cmd.version={{.Version}} -X cmd.commit={{.Commit}}
- -s -w -X diagram-converter/cmd.version={{.Version}} -X diagram-converter/cmd.commit={{.Commit}}
archives:
-
replacements:
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var versionCmd = &cobra.Command{
Short: "Output the application version",
Long: `Provides information about the release version and the Git commit it was built from.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("%s (%s)\n", version, string(commit[0:7]))
fmt.Printf("v%s (%s)\n", version, string(commit[0:7]))
},
}

Expand Down

0 comments on commit 6cad77a

Please sign in to comment.