diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 3e88437b..efb4fbfa 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -10,7 +10,7 @@ builds: env: - CGO_ENABLED=0 ldflags: - - -s -w -X main.versionMajor={{.Major}} -X main.versionMinor={{.Minor}} -X main.versionPatch={{.Patch}} -X main.versionPrerelease={{.Prerelease}} -X main.versionBuild={{.ShortCommit}} + - -s -w -X main.versionMajor={{.Major}} -X main.versionMinor={{.Minor}} -X main.versionPatch={{.Patch}} -X main.versionPrerelease={{.Prerelease}} -X main.versionBuild={{.ShortCommit}} -X main.hideUnreleasedFeatures=true goos: # - windows - darwin diff --git a/cmd/humanlog/account.go b/cmd/humanlog/account.go index 0194367d..53aae024 100644 --- a/cmd/humanlog/account.go +++ b/cmd/humanlog/account.go @@ -34,8 +34,9 @@ func accountCmd( getHTTPClient func(*cli.Context) *http.Client, ) cli.Command { return cli.Command{ - Name: accountCmdName, - Usage: "Manage accounts for the current user or org.", + Hidden: hideUnreleasedFeatures == "true", + Name: accountCmdName, + Usage: "Manage accounts for the current user or org.", Before: func(cctx *cli.Context) error { ctx := getCtx(cctx) state := getState(cctx) diff --git a/cmd/humanlog/auth.go b/cmd/humanlog/auth.go index 078bde48..4b6e40dd 100644 --- a/cmd/humanlog/auth.go +++ b/cmd/humanlog/auth.go @@ -35,7 +35,7 @@ func authCmd( ) cli.Command { return cli.Command{ Name: authCmdName, - Usage: "Authenticate with humanlog.io", + Usage: "Login with humanlog.io", Subcommands: cli.Commands{ { Name: "login", diff --git a/cmd/humanlog/machine.go b/cmd/humanlog/machine.go index 2d12c37a..8f52bf0a 100644 --- a/cmd/humanlog/machine.go +++ b/cmd/humanlog/machine.go @@ -26,8 +26,9 @@ func machineCmd( getHTTPClient func(*cli.Context) *http.Client, ) cli.Command { return cli.Command{ - Name: machineCmdName, - Usage: "Manage machines in the current account.", + Hidden: hideUnreleasedFeatures == "true", + Name: machineCmdName, + Usage: "Manage machines in the current account.", Before: func(cctx *cli.Context) error { ctx := getCtx(cctx) state := getState(cctx) diff --git a/cmd/humanlog/main.go b/cmd/humanlog/main.go index 67da00e3..7cfda5b1 100644 --- a/cmd/humanlog/main.go +++ b/cmd/humanlog/main.go @@ -63,8 +63,9 @@ var ( } return v }() - defaultApiAddr = "https://api.humanlog.io" - defaultBaseSiteAddr = "https://humanlog.io" + defaultApiAddr = "https://api.humanlog.io" + defaultBaseSiteAddr = "https://humanlog.io" + hideUnreleasedFeatures = "" huhTheme = huh.ThemeCatppuccin() ) @@ -194,14 +195,17 @@ func newApp() *cli.App { app := cli.NewApp() app.Author = "humanlog.io" - app.Email = "hi@humanlog.io" + app.Email = "antoine@webscale.lol" app.Name = "humanlog" app.Version = semverVersion.String() app.Usage = "reads structured logs from stdin, makes them pretty on stdout!" app.Description = `humanlog parses logs and makes them easier to read and search. When invoked with no argument, it consumes stdin and parses it, - attempts to make it prettier on stdout. It also allows searching + attempting to make detected logs prettier on stdout.` + if hideUnreleasedFeatures != "true" { + app.Description += ` + It also allows searching the logs that were parsed, both in a TUI by pressing "s" or in a webapp by pressing "space". @@ -209,6 +213,7 @@ func newApp() *cli.App { will be saved to humanlog.io for vizualization, searching and analysis. ` + } var ( ctx context.Context diff --git a/cmd/humanlog/organization.go b/cmd/humanlog/organization.go index a08cbd58..dbc701d8 100644 --- a/cmd/humanlog/organization.go +++ b/cmd/humanlog/organization.go @@ -40,6 +40,7 @@ func organizationCmd( ) return cli.Command{ + Hidden: hideUnreleasedFeatures == "true", Name: organizationCmdName, ShortName: "org", Usage: "Manage organizations for the current user.", diff --git a/cmd/humanlog/query.go b/cmd/humanlog/query.go index 313dc527..a32f4c10 100644 --- a/cmd/humanlog/query.go +++ b/cmd/humanlog/query.go @@ -41,8 +41,9 @@ func queryCmd( getHTTPClient func(*cli.Context) *http.Client, ) cli.Command { return cli.Command{ - Name: queryCmdName, - Usage: "Query your logs", + Hidden: hideUnreleasedFeatures == "true", + Name: queryCmdName, + Usage: "Query your logs", Subcommands: []cli.Command{ {