2021-06-22 20:10:31 +00:00
|
|
|
diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel
|
|
|
|
index 461df15..efa4c26 100644
|
|
|
|
--- a/docs/BUILD.bazel
|
|
|
|
+++ b/docs/BUILD.bazel
|
|
|
|
@@ -68,16 +68,17 @@ build_test(
|
|
|
|
|
|
|
|
genrule(
|
|
|
|
name = "generate_docs_src",
|
|
|
|
- srcs = DOCS_TARGETS,
|
|
|
|
+ srcs = DOCS_TARGETS + ["index.md"],
|
|
|
|
outs = ["generate_docs.sh"],
|
|
|
|
cmd = """cat << EOF > $@
|
2021-12-03 16:21:31 +00:00
|
|
|
#!/bin/bash
|
2021-06-22 20:10:31 +00:00
|
|
|
set -euo pipefail
|
|
|
|
-cat \\$${BUILD_WORKSPACE_DIRECTORY}/$(location //:flatten_docs) > \\$${BUILD_WORKSPACE_DIRECTORY}/flatten.md
|
|
|
|
-cat \\$${BUILD_WORKSPACE_DIRECTORY}/$(location //:cmake_docs) > \\$${BUILD_WORKSPACE_DIRECTORY}/cmake.md
|
|
|
|
-cat \\$${BUILD_WORKSPACE_DIRECTORY}/$(location //:ninja_docs) > \\$${BUILD_WORKSPACE_DIRECTORY}/ninja.md
|
|
|
|
-cat \\$${BUILD_WORKSPACE_DIRECTORY}/$(location //:make_docs) > \\$${BUILD_WORKSPACE_DIRECTORY}/make.md
|
|
|
|
-cat \\$${BUILD_WORKSPACE_DIRECTORY}/$(location //:configure_make_docs) > \\$${BUILD_WORKSPACE_DIRECTORY}/configure_make.md
|
|
|
|
+cat \\$${BUILD_WORKSPACE_DIRECTORY}/$(location //:flatten_docs) > \\$${BUILD_WORKSPACE_DIRECTORY}/src/flatten.md
|
|
|
|
+cat \\$${BUILD_WORKSPACE_DIRECTORY}/$(location //:cmake_docs) > \\$${BUILD_WORKSPACE_DIRECTORY}/src/cmake.md
|
|
|
|
+cat \\$${BUILD_WORKSPACE_DIRECTORY}/$(location //:ninja_docs) > \\$${BUILD_WORKSPACE_DIRECTORY}/src/ninja.md
|
|
|
|
+cat \\$${BUILD_WORKSPACE_DIRECTORY}/$(location //:make_docs) > \\$${BUILD_WORKSPACE_DIRECTORY}/src/make.md
|
|
|
|
+cat \\$${BUILD_WORKSPACE_DIRECTORY}/$(location //:configure_make_docs) > \\$${BUILD_WORKSPACE_DIRECTORY}/src/configure_make.md
|
|
|
|
+cp \\$${BUILD_WORKSPACE_DIRECTORY}/$(rootpath index.md) \\$${BUILD_WORKSPACE_DIRECTORY}/src/index.md
|
|
|
|
EOF
|
|
|
|
""",
|
|
|
|
)
|
|
|
|
diff --git a/docs/book.toml b/docs/book.toml
|
|
|
|
new file mode 100644
|
|
|
|
index 0000000..5096728
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/docs/book.toml
|
|
|
|
@@ -0,0 +1,5 @@
|
|
|
|
+[book]
|
|
|
|
+title = "Rules ForeignCc"
|
|
|
|
+
|
|
|
|
+[output.html]
|
2024-11-18 21:47:51 +00:00
|
|
|
+git-repository-url = "https://github.com/bazel-contrib/rules_foreign_cc"
|
2021-06-22 20:10:31 +00:00
|
|
|
diff --git a/docs/index.md b/docs/index.md
|
|
|
|
index 3a91e41..14c8e3b 100644
|
|
|
|
--- a/docs/index.md
|
|
|
|
+++ b/docs/index.md
|
|
|
|
@@ -21,9 +21,12 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "rules_foreign_cc",
|
|
|
|
- sha256 = "d54742ffbdc6924f222d2179f0e10e911c5c659c4ae74158e9fe827aad862ac6",
|
|
|
|
- strip_prefix = "rules_foreign_cc-0.2.0",
|
2024-11-26 22:41:44 +00:00
|
|
|
- url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.2.0.tar.gz",
|
2021-06-22 20:10:31 +00:00
|
|
|
+ # TODO: Get the latest sha256 value from the latest release on the releases page
|
2024-11-18 21:47:51 +00:00
|
|
|
+ # https://github.com/bazel-contrib/rules_foreign_cc/releases
|
2021-06-22 20:10:31 +00:00
|
|
|
+ #
|
|
|
|
+ # sha256 = "...",
|
|
|
|
+ strip_prefix = "rules_foreign_cc-0.3.0",
|
2024-11-18 21:47:51 +00:00
|
|
|
+ url = "https://github.com/bazel-contrib/rules_foreign_cc/archive/0.3.0.tar.gz",
|
2021-06-22 20:10:31 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
|
|
|
|
diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md
|
|
|
|
new file mode 100644
|
|
|
|
index 0000000..9e77270
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/docs/src/SUMMARY.md
|
|
|
|
@@ -0,0 +1,8 @@
|
|
|
|
+# SUMMARY
|
|
|
|
+
|
|
|
|
+- [Rules ForeignCc](index.md)
|
|
|
|
+ - [cmake](cmake.md)
|
|
|
|
+ - [configure_make](configure_make.md)
|
|
|
|
+ - [make](make.md)
|
|
|
|
+ - [ninja](ninja.md)
|
|
|
|
+ - [Full API](flatten.md)
|
|
|
|
diff --git a/version.bzl b/version.bzl
|
|
|
|
new file mode 100644
|
|
|
|
index 0000000..98bb722
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/version.bzl
|
|
|
|
@@ -0,0 +1,3 @@
|
|
|
|
+"""A module represeting the version of rules_foreign_cc"""
|
|
|
|
+
|
|
|
|
+VERSION = "0.3.0"
|
2024-11-18 21:56:55 +00:00
|
|
|
diff --git a/docs/.bazelrc b/docs/.bazelrc
|
|
|
|
new file mode 100644
|
|
|
|
index 0000000..9eb0697
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/docs/.bazelrc
|
|
|
|
@@ -0,0 +1,7 @@
|
|
|
|
+# Bazel configuration flags for rules_foreign_cc_docs
|
|
|
|
+
|
|
|
|
+# https://github.com/bazelbuild/stardoc/issues/112
|
|
|
|
+common --incompatible_allow_tags_propagation
|
|
|
|
+
|
|
|
|
+common --noenable_bzlmod
|
|
|
|
+build --workspace_status_command=tools/workspace_status.sh
|
2024-11-26 22:41:44 +00:00
|
|
|
diff --git a/docs/stardoc_repository.bzl b/docs/stardoc_repository.bzl
|
|
|
|
index 2153aa8..7c63be7 100644
|
|
|
|
--- a/docs/stardoc_repository.bzl
|
|
|
|
+++ b/docs/stardoc_repository.bzl
|
|
|
|
@@ -7,9 +7,9 @@ def stardoc_repository():
|
|
|
|
maybe(
|
|
|
|
http_archive,
|
|
|
|
name = "io_bazel_stardoc",
|
|
|
|
+ sha256 = "3fd8fec4ddec3c670bd810904e2e33170bedfe12f90adf943508184be458c8bb",
|
|
|
|
urls = [
|
|
|
|
- "https://github.com/bazelbuild/stardoc/archive/a0f330bcbae44ffc59d50a86a830a661b8d18acc.zip",
|
|
|
|
+ "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.3/stardoc-0.5.3.tar.gz",
|
|
|
|
+ "https://github.com/bazelbuild/stardoc/releases/download/0.5.3/stardoc-0.5.3.tar.gz",
|
|
|
|
],
|
|
|
|
- sha256 = "e12831c6c414325c99325726dd26dabd8ed4c9efa7b4f27b4d1d9594ec7dfc40",
|
|
|
|
- strip_prefix = "stardoc-a0f330bcbae44ffc59d50a86a830a661b8d18acc",
|
|
|
|
)
|
|
|
|
diff --git a/docs/tools/workspace_status.sh b/docs/tools/workspace_status.sh
|
|
|
|
new file mode 100755
|
|
|
|
index 0000000..5ceb3f7
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/docs/tools/workspace_status.sh
|
|
|
|
@@ -0,0 +1,7 @@
|
|
|
|
+#!/usr/bin/env bash
|
|
|
|
+
|
|
|
|
+set -euo pipefail
|
|
|
|
+
|
|
|
|
+echo STABLE_SCM_SHORT_VERSION "$(git rev-parse --short HEAD)"
|
|
|
|
+echo STABLE_SCM_VERSION "$(git rev-parse HEAD)"
|
|
|
|
+echo STABLE_RELEASE "$(cat ../version.bzl | grep VERSION | sed 's/VERSION = "//' | sed 's/"//')"
|