Skip to content

Commit

Permalink
refactor: use built-in feature to suppress timestamps
Browse files Browse the repository at this point in the history
Was fixed in spf13/cobra#1104
  • Loading branch information
alexeagle committed Oct 1, 2021
1 parent 5e3a061 commit 809a68c
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 19 deletions.
2 changes: 2 additions & 0 deletions cmd/aspect/root/root.go
Expand Up @@ -41,6 +41,8 @@ func NewRootCmd(streams ioutils.Streams, defaultInteractive bool) *cobra.Command
SilenceUsage: true,
SilenceErrors: true,
Long: boldCyan.Sprintf(`Aspect CLI`) + ` is a better frontend for running bazel`,
// Suppress timestamps in generated Markdown, for determinism
DisableAutoGenTag: true,
}

// ### Flags
Expand Down
15 changes: 2 additions & 13 deletions docs/BUILD.bazel
Expand Up @@ -13,22 +13,11 @@ _DOCS = [

genrule(
name = "docgen",
outs = ["raw/" + d for d in _DOCS],
cmd = "$(execpath //cmd/docgen) $(@D)/raw",
outs = ["gen/" + d for d in _DOCS],
cmd = "$(execpath //cmd/docgen) $(@D)/gen",
tools = ["//cmd/docgen"],
)

# Make a deterministic output by stripping date info
[
genrule(
name = "strip_date_%s" % src,
srcs = ["raw/" + src],
outs = ["gen/" + src],
cmd = "sed 's#by spf13/cobra on .*#by spf13/cobra#' <$< >$@",
)
for src in _DOCS
]

# Help developers who get a red CI result by telling them how to fix it
_failure_message = "\nPlease update the docs by running\n bazel run //docs:update"

Expand Down
1 change: 0 additions & 1 deletion docs/aspect.md
Expand Up @@ -22,4 +22,3 @@ Aspect CLI is a better frontend for running bazel
* [aspect info](aspect_info.md) - Displays runtime info about the bazel server.
* [aspect version](aspect_version.md) - Print the version of aspect CLI as well as tools it invokes.

###### Auto generated by spf13/cobra
1 change: 0 additions & 1 deletion docs/aspect_build.md
Expand Up @@ -27,4 +27,3 @@ aspect build [flags]

* [aspect](aspect.md) - Aspect.build bazel wrapper

###### Auto generated by spf13/cobra
1 change: 0 additions & 1 deletion docs/aspect_clean.md
Expand Up @@ -65,4 +65,3 @@ aspect clean [flags]

* [aspect](aspect.md) - Aspect.build bazel wrapper

###### Auto generated by spf13/cobra
1 change: 0 additions & 1 deletion docs/aspect_docs.md
Expand Up @@ -29,4 +29,3 @@ aspect docs [flags]

* [aspect](aspect.md) - Aspect.build bazel wrapper

###### Auto generated by spf13/cobra
1 change: 0 additions & 1 deletion docs/aspect_info.md
Expand Up @@ -46,4 +46,3 @@ aspect info [flags]

* [aspect](aspect.md) - Aspect.build bazel wrapper

###### Auto generated by spf13/cobra
1 change: 0 additions & 1 deletion docs/aspect_version.md
Expand Up @@ -28,4 +28,3 @@ aspect version [flags]

* [aspect](aspect.md) - Aspect.build bazel wrapper

###### Auto generated by spf13/cobra

0 comments on commit 809a68c

Please sign in to comment.