refactor: use built-in feature to suppress timestamps (#40)
Was fixed in https://github.com/spf13/cobra/pull/1104
diff --git a/cmd/aspect/root/root.go b/cmd/aspect/root/root.go
index 55686fd..d6e229c 100644
--- a/cmd/aspect/root/root.go
+++ b/cmd/aspect/root/root.go
@@ -42,6 +42,8 @@
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
diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel
index 15f106d..057103d 100644
--- a/docs/BUILD.bazel
+++ b/docs/BUILD.bazel
@@ -15,22 +15,11 @@
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"
diff --git a/docs/aspect.md b/docs/aspect.md
index 3fbd99b..6a6c609 100644
--- a/docs/aspect.md
+++ b/docs/aspect.md
@@ -23,4 +23,3 @@
* [aspect test](aspect_test.md) - Builds the specified targets and runs all test targets among them.
* [aspect version](aspect_version.md) - Print the version of aspect CLI as well as tools it invokes.
-###### Auto generated by spf13/cobra
diff --git a/docs/aspect_build.md b/docs/aspect_build.md
index 7dd414d..0b4214a 100644
--- a/docs/aspect_build.md
+++ b/docs/aspect_build.md
@@ -27,4 +27,3 @@
* [aspect](aspect.md) - Aspect.build bazel wrapper
-###### Auto generated by spf13/cobra
diff --git a/docs/aspect_clean.md b/docs/aspect_clean.md
index 7904e09..5027488 100644
--- a/docs/aspect_clean.md
+++ b/docs/aspect_clean.md
@@ -65,4 +65,3 @@
* [aspect](aspect.md) - Aspect.build bazel wrapper
-###### Auto generated by spf13/cobra
diff --git a/docs/aspect_docs.md b/docs/aspect_docs.md
index c044aff..c6380fe 100644
--- a/docs/aspect_docs.md
+++ b/docs/aspect_docs.md
@@ -29,4 +29,3 @@
* [aspect](aspect.md) - Aspect.build bazel wrapper
-###### Auto generated by spf13/cobra
diff --git a/docs/aspect_info.md b/docs/aspect_info.md
index ed33ea1..4174c21 100644
--- a/docs/aspect_info.md
+++ b/docs/aspect_info.md
@@ -46,4 +46,3 @@
* [aspect](aspect.md) - Aspect.build bazel wrapper
-###### Auto generated by spf13/cobra
diff --git a/docs/aspect_version.md b/docs/aspect_version.md
index 5b04669..7a27d8d 100644
--- a/docs/aspect_version.md
+++ b/docs/aspect_version.md
@@ -28,4 +28,3 @@
* [aspect](aspect.md) - Aspect.build bazel wrapper
-###### Auto generated by spf13/cobra