Skip to content
Open
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

SHELL = /bin/bash

VERSION = v1.5.0
VERSION = v1.5.1
BUILDER = docker.elastic.co/beats-dev/golang-crossbuild:1.19-$$BUILDER_TAG-debian10
BUILD_TARGETS = linux/amd64 windows/amd64 darwin/amd64 darwin/arm64

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Flags:
--no-simplify Don't simplify output.
--tab-width int Number of spaces per indentation level. (default 4)
--use-spaces Indent with spaces instead of tabs.
-v, --version version for sqlfmt
```

## Examples
Expand Down
9 changes: 5 additions & 4 deletions internal/cli/sqlfmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ var sqlfmtCtx struct {
// NewSqlfmtCmd create and returns the sqlfmt command
func NewSqlfmtCmd() *cobra.Command {
sqlfmtCmd := &cobra.Command{
Use: "sqlfmt",
Short: "format SQL statements",
Long: "Formats SQL statements from stdin to line length n.",
RunE: runSQLFmt,
Use: "sqlfmt",
Version: "1.5.1",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution @JMavs !!!

Can we define the version in a const or get the value present in the Makefile somehow? Its 100% likely that I will forget to update the value in two places in the next release and thus, give incorrect data to the user.

Short: "format SQL statements",
Long: "Formats SQL statements from stdin to line length n.",
RunE: runSQLFmt,
}

cfg := tree.DefaultPrettyCfg()
Expand Down