Skip to content

Commit 00ac5ee

Browse files
committed
fix: patch old releases
The doc generation was failing for old releases because the .bazelrc file wasn't disabling Bzlmod. See: bazel-contrib#1316 (comment)
1 parent b479ffb commit 00ac5ee

13 files changed

+166
-1
lines changed

.github/docs-0.1.0.patch

+13
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,16 @@ index 0000000..98bb722
4040
+"""A module represeting the version of rules_foreign_cc"""
4141
+
4242
+VERSION = "0.1.0"
43+
diff --git a/docs/.bazelrc b/docs/.bazelrc
44+
new file mode 100644
45+
index 0000000..9eb0697
46+
--- /dev/null
47+
+++ b/docs/.bazelrc
48+
@@ -0,0 +1,7 @@
49+
+# Bazel configuration flags for rules_foreign_cc_docs
50+
+
51+
+# https://github.com/bazelbuild/stardoc/issues/112
52+
+common --incompatible_allow_tags_propagation
53+
+
54+
+common --noenable_bzlmod
55+
+build --workspace_status_command=tools/workspace_status.sh

.github/docs-0.10.1.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/docs/.bazelrc b/docs/.bazelrc
2+
index dc6a3f7..9eb0697 100644
3+
--- a/docs/.bazelrc
4+
+++ b/docs/.bazelrc
5+
@@ -1,3 +1,7 @@
6+
-# Bazel configuration flags for rules_foregin_cc_docs
7+
+# Bazel configuration flags for rules_foreign_cc_docs
8+
9+
+# https://github.com/bazelbuild/stardoc/issues/112
10+
+common --incompatible_allow_tags_propagation
11+
+
12+
+common --noenable_bzlmod
13+
build --workspace_status_command=tools/workspace_status.sh

.github/docs-0.2.0.patch

+13
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,16 @@ index 0000000..98bb722
4040
+"""A module represeting the version of rules_foreign_cc"""
4141
+
4242
+VERSION = "0.2.0"
43+
diff --git a/docs/.bazelrc b/docs/.bazelrc
44+
new file mode 100644
45+
index 0000000..9eb0697
46+
--- /dev/null
47+
+++ b/docs/.bazelrc
48+
@@ -0,0 +1,7 @@
49+
+# Bazel configuration flags for rules_foreign_cc_docs
50+
+
51+
+# https://github.com/bazelbuild/stardoc/issues/112
52+
+common --incompatible_allow_tags_propagation
53+
+
54+
+common --noenable_bzlmod
55+
+build --workspace_status_command=tools/workspace_status.sh

.github/docs-0.3.0.patch

+13
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,16 @@ index 0000000..98bb722
8080
+"""A module represeting the version of rules_foreign_cc"""
8181
+
8282
+VERSION = "0.3.0"
83+
diff --git a/docs/.bazelrc b/docs/.bazelrc
84+
new file mode 100644
85+
index 0000000..9eb0697
86+
--- /dev/null
87+
+++ b/docs/.bazelrc
88+
@@ -0,0 +1,7 @@
89+
+# Bazel configuration flags for rules_foreign_cc_docs
90+
+
91+
+# https://github.com/bazelbuild/stardoc/issues/112
92+
+common --incompatible_allow_tags_propagation
93+
+
94+
+common --noenable_bzlmod
95+
+build --workspace_status_command=tools/workspace_status.sh

.github/docs-0.4.0.patch

+13
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,16 @@ index 2bdbf6e..418dd13 100644
1111
release="\\$${RELEASE}"
1212
fi
1313
mkdir -p \\$${BUILD_WORKSPACE_DIRECTORY}/src
14+
diff --git a/docs/.bazelrc b/docs/.bazelrc
15+
index dc6a3f7..9eb0697 100644
16+
--- a/docs/.bazelrc
17+
+++ b/docs/.bazelrc
18+
@@ -1,3 +1,7 @@
19+
-# Bazel configuration flags for rules_foregin_cc_docs
20+
+# Bazel configuration flags for rules_foreign_cc_docs
21+
22+
+# https://github.com/bazelbuild/stardoc/issues/112
23+
+common --incompatible_allow_tags_propagation
24+
+
25+
+common --noenable_bzlmod
26+
build --workspace_status_command=tools/workspace_status.sh

.github/docs-0.5.0.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/docs/.bazelrc b/docs/.bazelrc
2+
index dc6a3f7..9eb0697 100644
3+
--- a/docs/.bazelrc
4+
+++ b/docs/.bazelrc
5+
@@ -1,3 +1,7 @@
6+
-# Bazel configuration flags for rules_foregin_cc_docs
7+
+# Bazel configuration flags for rules_foreign_cc_docs
8+
9+
+# https://github.com/bazelbuild/stardoc/issues/112
10+
+common --incompatible_allow_tags_propagation
11+
+
12+
+common --noenable_bzlmod
13+
build --workspace_status_command=tools/workspace_status.sh

.github/docs-0.5.1.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/docs/.bazelrc b/docs/.bazelrc
2+
index dc6a3f7..9eb0697 100644
3+
--- a/docs/.bazelrc
4+
+++ b/docs/.bazelrc
5+
@@ -1,3 +1,7 @@
6+
-# Bazel configuration flags for rules_foregin_cc_docs
7+
+# Bazel configuration flags for rules_foreign_cc_docs
8+
9+
+# https://github.com/bazelbuild/stardoc/issues/112
10+
+common --incompatible_allow_tags_propagation
11+
+
12+
+common --noenable_bzlmod
13+
build --workspace_status_command=tools/workspace_status.sh

.github/docs-0.6.0.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/docs/.bazelrc b/docs/.bazelrc
2+
index dc6a3f7..9eb0697 100644
3+
--- a/docs/.bazelrc
4+
+++ b/docs/.bazelrc
5+
@@ -1,3 +1,7 @@
6+
-# Bazel configuration flags for rules_foregin_cc_docs
7+
+# Bazel configuration flags for rules_foreign_cc_docs
8+
9+
+# https://github.com/bazelbuild/stardoc/issues/112
10+
+common --incompatible_allow_tags_propagation
11+
+
12+
+common --noenable_bzlmod
13+
build --workspace_status_command=tools/workspace_status.sh

.github/docs-0.7.0.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/docs/.bazelrc b/docs/.bazelrc
2+
index dc6a3f7..9eb0697 100644
3+
--- a/docs/.bazelrc
4+
+++ b/docs/.bazelrc
5+
@@ -1,3 +1,7 @@
6+
-# Bazel configuration flags for rules_foregin_cc_docs
7+
+# Bazel configuration flags for rules_foreign_cc_docs
8+
9+
+# https://github.com/bazelbuild/stardoc/issues/112
10+
+common --incompatible_allow_tags_propagation
11+
+
12+
+common --noenable_bzlmod
13+
build --workspace_status_command=tools/workspace_status.sh

.github/docs-0.7.1.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/docs/.bazelrc b/docs/.bazelrc
2+
index dc6a3f7..9eb0697 100644
3+
--- a/docs/.bazelrc
4+
+++ b/docs/.bazelrc
5+
@@ -1,3 +1,7 @@
6+
-# Bazel configuration flags for rules_foregin_cc_docs
7+
+# Bazel configuration flags for rules_foreign_cc_docs
8+
9+
+# https://github.com/bazelbuild/stardoc/issues/112
10+
+common --incompatible_allow_tags_propagation
11+
+
12+
+common --noenable_bzlmod
13+
build --workspace_status_command=tools/workspace_status.sh

.github/docs-0.8.0.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/docs/.bazelrc b/docs/.bazelrc
2+
index dc6a3f7..9eb0697 100644
3+
--- a/docs/.bazelrc
4+
+++ b/docs/.bazelrc
5+
@@ -1,3 +1,7 @@
6+
-# Bazel configuration flags for rules_foregin_cc_docs
7+
+# Bazel configuration flags for rules_foreign_cc_docs
8+
9+
+# https://github.com/bazelbuild/stardoc/issues/112
10+
+common --incompatible_allow_tags_propagation
11+
+
12+
+common --noenable_bzlmod
13+
build --workspace_status_command=tools/workspace_status.sh

.github/docs-0.9.0.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/docs/.bazelrc b/docs/.bazelrc
2+
index dc6a3f7..9eb0697 100644
3+
--- a/docs/.bazelrc
4+
+++ b/docs/.bazelrc
5+
@@ -1,3 +1,7 @@
6+
-# Bazel configuration flags for rules_foregin_cc_docs
7+
+# Bazel configuration flags for rules_foreign_cc_docs
8+
9+
+# https://github.com/bazelbuild/stardoc/issues/112
10+
+common --incompatible_allow_tags_propagation
11+
+
12+
+common --noenable_bzlmod
13+
build --workspace_status_command=tools/workspace_status.sh

.github/workflows/pages.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,19 @@ jobs:
4444
if: ${{ matrix.ref == 'main' }}
4545
- name: Patch older branches
4646
run: |
47+
ref="${{ matrix.ref }}"
48+
49+
[[ "$ref" == "main" ]] && exit
50+
51+
v_major="$(echo "$ref" | cut -d. -f1)"
52+
v_minor="$(echo "$ref" | cut -d. -f2)"
53+
v_patch="$(echo "$ref" | cut -d. -f3)"
54+
55+
[[ $v_major -gt 10 ]] && exit
56+
4757
mkdir -p ${{ github.workspace }}/.github
4858
curl https://raw.githubusercontent.com/bazelbuild/rules_foreign_cc/main/.github/docs-${{ matrix.ref }}.patch > ${{ github.workspace }}/.github/docs-${{ matrix.ref }}.patch
4959
git apply ${{ github.workspace }}/.github/docs-${{ matrix.ref }}.patch
50-
if: ${{ matrix.ref == '0.4.0' || matrix.ref == '0.3.0' || matrix.ref == '0.2.0' || matrix.ref == '0.1.0' }}
5160
- name: Install bazelisk
5261
run: |
5362
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.9.0/bazelisk-linux-amd64"

0 commit comments

Comments
 (0)