diff --git a/configure/attributes.mdx b/configure/attributes.mdx index 7bc3f41..2ba93cc 100644 --- a/configure/attributes.mdx +++ b/configure/attributes.mdx @@ -44,28 +44,12 @@ config_setting( This declares a `cc_binary` that "chooses" its deps based on the flags at the command line. Specifically, `deps` becomes: - - - - - - - - - - - - - - - - - - - - - -
Commanddeps =
bazel build //myapp:mybinary --cpu=arm[":arm_lib"]
bazel build //myapp:mybinary -c dbg --cpu=x86[":x86_dev_lib"]
bazel build //myapp:mybinary --cpu=ppc[":generic_lib"]
bazel build //myapp:mybinary -c dbg --cpu=ppc[":generic_lib"]
+| Command | deps | +| ----------------------------------------------- | ------------------ | +| `bazel build //myapp:mybinary --cpu=arm` | `[":arm_lib"]` | +| `bazel build //myapp:mybinary -c dbg --cpu=x86` | `[":x86_dev_lib"]` | +| `bazel build //myapp:mybinary --cpu=ppc` | `[":generic_lib"]` | +| `bazel build //myapp:mybinary -c dbg --cpu=ppc` | `[":generic_lib"]` | `select()` serves as a placeholder for a value that will be chosen based on *configuration conditions*, which are labels referencing [`config_setting`](/reference/be/general#config_setting) diff --git a/copy-upstream-docs.sh b/copy-upstream-docs.sh index 0675b28..21b17fe 100755 --- a/copy-upstream-docs.sh +++ b/copy-upstream-docs.sh @@ -57,6 +57,12 @@ if [ ! -d "$SOURCE_DIR" ]; then exit 1 fi +( + cd upstream + echo "Patching files" + patch -p1 < ../patches/*.patch +) + echo "Finding all .md files in $SOURCE_DIR..." # Find all .md files and copy them @@ -84,5 +90,11 @@ find "$SOURCE_DIR" -name "*.md" -type f | while read -r source_file; do awk -f transform-docs.awk "$source_file" > "$target_file" done +( + cd upstream + echo "Undoing patches" + git reset --hard +) + echo "Successfully copied all .md files to .mdx files in root" echo "You can now modify the files as needed." diff --git a/patches/attributes.patch b/patches/attributes.patch new file mode 100644 index 0000000..a1745e7 --- /dev/null +++ b/patches/attributes.patch @@ -0,0 +1,39 @@ +diff --git a/site/en/configure/attributes.md b/site/en/configure/attributes.md +index 7b55a6f..945ac81 100644 +--- a/site/en/configure/attributes.md ++++ b/site/en/configure/attributes.md +@@ -45,28 +45,12 @@ config_setting( + This declares a `cc_binary` that "chooses" its deps based on the flags at the + command line. Specifically, `deps` becomes: + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-
Commanddeps =
bazel build //myapp:mybinary --cpu=arm[":arm_lib"]
bazel build //myapp:mybinary -c dbg --cpu=x86[":x86_dev_lib"]
bazel build //myapp:mybinary --cpu=ppc[":generic_lib"]
bazel build //myapp:mybinary -c dbg --cpu=ppc[":generic_lib"]
++| Command | deps | ++| ----------------------------------------------- | ------------------ | ++| `bazel build //myapp:mybinary --cpu=arm` | `[":arm_lib"]` | ++| `bazel build //myapp:mybinary -c dbg --cpu=x86` | `[":x86_dev_lib"]` | ++| `bazel build //myapp:mybinary --cpu=ppc` | `[":generic_lib"]` | ++| `bazel build //myapp:mybinary -c dbg --cpu=ppc` | `[":generic_lib"]` | + + `select()` serves as a placeholder for a value that will be chosen based on + *configuration conditions*, which are labels referencing [`config_setting`](/reference/be/general#config_setting)