diff --git a/pkg/api/api.go b/pkg/api/api.go index a6b30c4..4f27f8c 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -449,7 +449,7 @@ func GetBookmarks(c *gin.Context) { func GetInfo(c *gin.Context) { successResponse(c, gin.H{ - "version": command.VERSION, + "version": command.Version, "git_sha": command.GitCommit, "build_time": command.BuildTime, }) diff --git a/pkg/cli/cli.go b/pkg/cli/cli.go index 5c58a74..8785154 100644 --- a/pkg/cli/cli.go +++ b/pkg/cli/cli.go @@ -136,7 +136,7 @@ For proper read-only access please follow postgresql role management documentati } func printVersion() { - str := fmt.Sprintf("Pgweb v%s", command.VERSION) + str := fmt.Sprintf("Pgweb v%s", command.Version) if command.GitCommit != "" { str += fmt.Sprintf(" (git: %s)", command.GitCommit) } diff --git a/pkg/command/version.go b/pkg/command/version.go index 675955f..803a419 100644 --- a/pkg/command/version.go +++ b/pkg/command/version.go @@ -1,6 +1,8 @@ package command -const VERSION = "0.10.0" +const ( + Version = "0.10.0" +) var ( GitCommit string