chore: remove timestamp from generated docs (#1265)

This is causing trouble with new PRs that potentially change CLI flags
or other user-facing UX. Another option besides completely removing the
version information is to modify Version.StringVerbose() so that it uses
the value of the most recent semver tag (or Knative tag).

```
❯ git describe --match "v*"
v0.34.0-6-g6d26e64c

❯ git describe --match "knative*"
knative-v1.7.0-6-g6d26e64c
```

This is nice, but could be misleading if the UX has changed since that
release.

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
This commit is contained in:
Lance Ball 2022-09-21 09:55:10 -04:00 committed by GitHub
parent 4979e03357
commit 44ff20d782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 12 deletions

View File

@ -34,7 +34,7 @@ func NewRootCmd(config RootCommandConfig) *cobra.Command {
Short: "Serverless functions",
SilenceErrors: true, // we explicitly handle errors in Execute()
SilenceUsage: true, // no usage dump on error
Long: `Serverless functions {{.Version}}
Long: `Knative serverless functions
Create, build and deploy Knative functions

View File

@ -17,14 +17,6 @@ import (
)
var (
// Statically-populated build metadata set by `make build`.
date, vers, hash string
version = cmd.Version{
Date: date,
Vers: vers,
Hash: hash,
}
// Helper function for indenting template values correctly
fm = template.FuncMap{
"indent": func(i int, c string, v string) string {
@ -41,7 +33,6 @@ var (
type TemplateOptions struct {
Name string
Options string
Version string
Use string
}
@ -62,7 +53,6 @@ func main() {
templateOptions := TemplateOptions{
Name: rootName,
Options: opts,
Version: version.StringVerbose(),
Use: rootName,
}

View File

@ -4,7 +4,7 @@ Serverless functions
### Synopsis
Serverless functions v0.0.0-source-2022-09-20T08:13:19&#43;02:00
Knative serverless functions
Create, build and deploy Knative functions