mirror of https://github.com/knative/func.git
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:
parent
4979e03357
commit
44ff20d782
|
@ -34,7 +34,7 @@ func NewRootCmd(config RootCommandConfig) *cobra.Command {
|
||||||
Short: "Serverless functions",
|
Short: "Serverless functions",
|
||||||
SilenceErrors: true, // we explicitly handle errors in Execute()
|
SilenceErrors: true, // we explicitly handle errors in Execute()
|
||||||
SilenceUsage: true, // no usage dump on error
|
SilenceUsage: true, // no usage dump on error
|
||||||
Long: `Serverless functions {{.Version}}
|
Long: `Knative serverless functions
|
||||||
|
|
||||||
Create, build and deploy Knative functions
|
Create, build and deploy Knative functions
|
||||||
|
|
||||||
|
|
|
@ -17,14 +17,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
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
|
// Helper function for indenting template values correctly
|
||||||
fm = template.FuncMap{
|
fm = template.FuncMap{
|
||||||
"indent": func(i int, c string, v string) string {
|
"indent": func(i int, c string, v string) string {
|
||||||
|
@ -41,7 +33,6 @@ var (
|
||||||
type TemplateOptions struct {
|
type TemplateOptions struct {
|
||||||
Name string
|
Name string
|
||||||
Options string
|
Options string
|
||||||
Version string
|
|
||||||
Use string
|
Use string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +53,6 @@ func main() {
|
||||||
templateOptions := TemplateOptions{
|
templateOptions := TemplateOptions{
|
||||||
Name: rootName,
|
Name: rootName,
|
||||||
Options: opts,
|
Options: opts,
|
||||||
Version: version.StringVerbose(),
|
|
||||||
Use: rootName,
|
Use: rootName,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ Serverless functions
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
Serverless functions v0.0.0-source-2022-09-20T08:13:19+02:00
|
Knative serverless functions
|
||||||
|
|
||||||
Create, build and deploy Knative functions
|
Create, build and deploy Knative functions
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue