Skip to content

Commit c3c3bd2

Browse files
committed
feat: introduce ability to patch the upstream
1 parent f06aa0f commit c3c3bd2

File tree

3 files changed

+46
-22
lines changed

3 files changed

+46
-22
lines changed

.github/workflows/hugo-site-generator.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ jobs:
3939
working-directory: upstream
4040
run: git checkout ${{ inputs.bcrCommitHash }}
4141

42+
- name: Patch upstream docs
43+
working-directory: upstream
44+
run: patch -p1 < ../patches/*.patch
45+
4246
- name: Clean up mdx files
4347
run: ./cleanup-mdx.sh
4448

configure/attributes.mdx

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,9 @@ config_setting(
4444
This declares a `cc_binary` that "chooses" its deps based on the flags at the
4545
command line. Specifically, `deps` becomes:
4646

47-
<table>
48-
<tr style="background: #E9E9E9; font-weight: bold">
49-
<td>Command</td>
50-
<td>deps =</td>
51-
</tr>
52-
<tr>
53-
<td><code>bazel build //myapp:mybinary --cpu=arm</code></td>
54-
<td><code>[":arm_lib"]</code></td>
55-
</tr>
56-
<tr>
57-
<td><code>bazel build //myapp:mybinary -c dbg --cpu=x86</code></td>
58-
<td><code>[":x86_dev_lib"]</code></td>
59-
</tr>
60-
<tr>
61-
<td><code>bazel build //myapp:mybinary --cpu=ppc</code></td>
62-
<td><code>[":generic_lib"]</code></td>
63-
</tr>
64-
<tr>
65-
<td><code>bazel build //myapp:mybinary -c dbg --cpu=ppc</code></td>
66-
<td><code>[":generic_lib"]</code></td>
67-
</tr>
68-
</table>
47+
| Command | deps |
48+
| ---------------------------------------- | -------------- |
49+
| `bazel build //myapp:mybinary --cpu=arm` | `[":arm_lib"]` |
6950

7051
`select()` serves as a placeholder for a value that will be chosen based on
7152
*configuration conditions*, which are labels referencing [`config_setting`](/reference/be/general#config_setting)

patches/attributes.patch

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
diff --git a/site/en/configure/attributes.md b/site/en/configure/attributes.md
2+
index 7b55a6f..945ac81 100644
3+
--- a/site/en/configure/attributes.md
4+
+++ b/site/en/configure/attributes.md
5+
@@ -45,28 +45,12 @@ config_setting(
6+
This declares a `cc_binary` that "chooses" its deps based on the flags at the
7+
command line. Specifically, `deps` becomes:
8+
9+
-<table>
10+
- <tr style="background: #E9E9E9; font-weight: bold">
11+
- <td>Command</td>
12+
- <td>deps =</td>
13+
- </tr>
14+
- <tr>
15+
- <td><code>bazel build //myapp:mybinary --cpu=arm</code></td>
16+
- <td><code>[":arm_lib"]</code></td>
17+
- </tr>
18+
- <tr>
19+
- <td><code>bazel build //myapp:mybinary -c dbg --cpu=x86</code></td>
20+
- <td><code>[":x86_dev_lib"]</code></td>
21+
- </tr>
22+
- <tr>
23+
- <td><code>bazel build //myapp:mybinary --cpu=ppc</code></td>
24+
- <td><code>[":generic_lib"]</code></td>
25+
- </tr>
26+
- <tr>
27+
- <td><code>bazel build //myapp:mybinary -c dbg --cpu=ppc</code></td>
28+
- <td><code>[":generic_lib"]</code></td>
29+
- </tr>
30+
-</table>
31+
+| Command | deps |
32+
+| ----------------------------------------------- | ------------------ |
33+
+| `bazel build //myapp:mybinary --cpu=arm` | `[":arm_lib"]` |
34+
+| `bazel build //myapp:mybinary -c dbg --cpu=x86` | `[":x86_dev_lib"]` |
35+
+| `bazel build //myapp:mybinary --cpu=ppc` | `[":generic_lib"]` |
36+
+| `bazel build //myapp:mybinary -c dbg --cpu=ppc` | `[":generic_lib"]` |
37+
38+
`select()` serves as a placeholder for a value that will be chosen based on
39+
*configuration conditions*, which are labels referencing [`config_setting`](/reference/be/general#config_setting)

0 commit comments

Comments
 (0)