Skip to content

Commit 9c18606

Browse files
authored
fix: CLI dev version (#1864)
#### Summary In plugins we use `development` so we should have the same in the CLI (instead of `dev`). Also I think we need only `Version` as we can get the other values from the Version tag ---
1 parent aad6218 commit 9c18606

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

cli/.goreleaser.prerelease.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ builds:
1717
- GO111MODULE=on
1818
main: ./main.go
1919
ldflags:
20-
- -s -w -X github.com/cloudquery/cloudquery/cli/cmd.Version={{.Version}} -X github.com/cloudquery/cloudquery/cli/cmd.Commit={{.Commit}} -X github.com/cloudquery/cloudquery/cli/cmd.Date={{.Date}} -X github.com/cloudquery/cloudquery/cli/cmd.APIKey=28iMwucm5GXsoevNGSfDl1LC6zV
20+
- -s -w -X github.com/cloudquery/cloudquery/cli/cmd.Version={{.Version}}
2121
goos:
2222
- windows
2323
- linux

cli/cmd/root.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ import (
1616
const sentryDsnDefault = "https://3d2f1b94bdb64884ab1a52f56ce56652@o1396617.ingest.sentry.io/6720193"
1717

1818
var (
19-
// Values for Commit and Date should be injected at build time with -ldflags "-X github.com/cloudquery/cloudquery/cli/cmd.Variable=Value"
20-
21-
Commit = "development"
22-
Date = "unknown"
23-
APIKey = ""
24-
Version = "dev"
19+
Version = "development"
2520
rootShort = "CloudQuery CLI"
2621
rootLong = `CloudQuery CLI
2722
@@ -80,7 +75,7 @@ func NewCmdRoot() *cobra.Command {
8075
err = sentry.Init(sentry.ClientOptions{
8176
Debug: false,
8277
Dsn: sentryDsn,
83-
Release: "cloudquery@" + Commit,
78+
Release: "cloudquery@" + Version,
8479
// https://docs.sentry.io/platforms/go/configuration/options/#removing-default-integrations
8580
Integrations: func(integrations []sentry.Integration) []sentry.Integration {
8681
var filteredIntegrations []sentry.Integration

0 commit comments

Comments
 (0)