Skip to content

Commit

Permalink
fix: patch old releases
Browse files Browse the repository at this point in the history
The doc generation was failing for old releases because the .bazelrc
file wasn't disabling Bzlmod.

See:
#1316 (comment)
  • Loading branch information
jjmaestro authored and jsharpe committed Nov 18, 2024
1 parent 44982fe commit 633f7c0
Show file tree
Hide file tree
Showing 13 changed files with 166 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/docs-0.1.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,16 @@ index 0000000..98bb722
+"""A module represeting the version of rules_foreign_cc"""
+
+VERSION = "0.1.0"
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
13 changes: 13 additions & 0 deletions .github/docs-0.10.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/docs/.bazelrc b/docs/.bazelrc
index dc6a3f7..9eb0697 100644
--- a/docs/.bazelrc
+++ b/docs/.bazelrc
@@ -1,3 +1,7 @@
-# Bazel configuration flags for rules_foregin_cc_docs
+# 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
13 changes: 13 additions & 0 deletions .github/docs-0.2.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,16 @@ index 0000000..98bb722
+"""A module represeting the version of rules_foreign_cc"""
+
+VERSION = "0.2.0"
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
13 changes: 13 additions & 0 deletions .github/docs-0.3.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,16 @@ index 0000000..98bb722
+"""A module represeting the version of rules_foreign_cc"""
+
+VERSION = "0.3.0"
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
13 changes: 13 additions & 0 deletions .github/docs-0.4.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,16 @@ index 2bdbf6e..418dd13 100644
release="\\$${RELEASE}"
fi
mkdir -p \\$${BUILD_WORKSPACE_DIRECTORY}/src
diff --git a/docs/.bazelrc b/docs/.bazelrc
index dc6a3f7..9eb0697 100644
--- a/docs/.bazelrc
+++ b/docs/.bazelrc
@@ -1,3 +1,7 @@
-# Bazel configuration flags for rules_foregin_cc_docs
+# 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
13 changes: 13 additions & 0 deletions .github/docs-0.5.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/docs/.bazelrc b/docs/.bazelrc
index dc6a3f7..9eb0697 100644
--- a/docs/.bazelrc
+++ b/docs/.bazelrc
@@ -1,3 +1,7 @@
-# Bazel configuration flags for rules_foregin_cc_docs
+# 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
13 changes: 13 additions & 0 deletions .github/docs-0.5.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/docs/.bazelrc b/docs/.bazelrc
index dc6a3f7..9eb0697 100644
--- a/docs/.bazelrc
+++ b/docs/.bazelrc
@@ -1,3 +1,7 @@
-# Bazel configuration flags for rules_foregin_cc_docs
+# 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
13 changes: 13 additions & 0 deletions .github/docs-0.6.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/docs/.bazelrc b/docs/.bazelrc
index dc6a3f7..9eb0697 100644
--- a/docs/.bazelrc
+++ b/docs/.bazelrc
@@ -1,3 +1,7 @@
-# Bazel configuration flags for rules_foregin_cc_docs
+# 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
13 changes: 13 additions & 0 deletions .github/docs-0.7.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/docs/.bazelrc b/docs/.bazelrc
index dc6a3f7..9eb0697 100644
--- a/docs/.bazelrc
+++ b/docs/.bazelrc
@@ -1,3 +1,7 @@
-# Bazel configuration flags for rules_foregin_cc_docs
+# 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
13 changes: 13 additions & 0 deletions .github/docs-0.7.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/docs/.bazelrc b/docs/.bazelrc
index dc6a3f7..9eb0697 100644
--- a/docs/.bazelrc
+++ b/docs/.bazelrc
@@ -1,3 +1,7 @@
-# Bazel configuration flags for rules_foregin_cc_docs
+# 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
13 changes: 13 additions & 0 deletions .github/docs-0.8.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/docs/.bazelrc b/docs/.bazelrc
index dc6a3f7..9eb0697 100644
--- a/docs/.bazelrc
+++ b/docs/.bazelrc
@@ -1,3 +1,7 @@
-# Bazel configuration flags for rules_foregin_cc_docs
+# 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
13 changes: 13 additions & 0 deletions .github/docs-0.9.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/docs/.bazelrc b/docs/.bazelrc
index dc6a3f7..9eb0697 100644
--- a/docs/.bazelrc
+++ b/docs/.bazelrc
@@ -1,3 +1,7 @@
-# Bazel configuration flags for rules_foregin_cc_docs
+# 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
11 changes: 10 additions & 1 deletion .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,19 @@ jobs:
if: ${{ matrix.ref == 'main' }}
- name: Patch older branches
run: |
ref="${{ matrix.ref }}"
[[ "$ref" == "main" ]] && exit
v_major="$(echo "$ref" | cut -d. -f1)"
v_minor="$(echo "$ref" | cut -d. -f2)"
v_patch="$(echo "$ref" | cut -d. -f3)"
[[ $v_major -gt 10 ]] && exit
mkdir -p ${{ github.workspace }}/.github
curl https://raw.githubusercontent.com/bazel-contrib/rules_foreign_cc/main/.github/docs-${{ matrix.ref }}.patch > ${{ github.workspace }}/.github/docs-${{ matrix.ref }}.patch
git apply ${{ github.workspace }}/.github/docs-${{ matrix.ref }}.patch
if: ${{ matrix.ref == '0.4.0' || matrix.ref == '0.3.0' || matrix.ref == '0.2.0' || matrix.ref == '0.1.0' }}
- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.9.0/bazelisk-linux-amd64"
Expand Down

0 comments on commit 633f7c0

Please sign in to comment.