From 44ff20d782539a1d8f9ac8d70791333c35aedcb0 Mon Sep 17 00:00:00 2001 From: Lance Ball Date: Wed, 21 Sep 2022 09:55:10 -0400 Subject: [PATCH] chore: remove timestamp from generated docs (#1265) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Lance Ball --- cmd/root.go | 2 +- docs/generator/main.go | 10 ---------- docs/reference/func.md | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index c9276c5f..cd34eb0c 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -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 diff --git a/docs/generator/main.go b/docs/generator/main.go index d98ea268..157d5b82 100644 --- a/docs/generator/main.go +++ b/docs/generator/main.go @@ -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, } diff --git a/docs/reference/func.md b/docs/reference/func.md index 84a745ca..194bdc03 100644 --- a/docs/reference/func.md +++ b/docs/reference/func.md @@ -4,7 +4,7 @@ Serverless functions ### Synopsis -Serverless functions v0.0.0-source-2022-09-20T08:13:19+02:00 +Knative serverless functions Create, build and deploy Knative functions