Rename bazel_skylib default branch to main.
See https://github.com/bazelbuild/bazel-skylib/branches and
https://github.com/bazelbuild/bazel-skylib/issues/281.
RELNOTES: None.
PiperOrigin-RevId: 368882757
diff --git a/site/docs/configurable-attributes.md b/site/docs/configurable-attributes.md
index 07b5fb2..18091ed 100644
--- a/site/docs/configurable-attributes.md
+++ b/site/docs/configurable-attributes.md
@@ -455,9 +455,9 @@
### <a name="selects-with-or"></a>`selects.with_or`
The
-[with_or](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/selects_doc.md#selectswith_or)
+[with_or](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/selects_doc.md#selectswith_or)
macro in [Skylib](https://github.com/bazelbuild/bazel-skylib)'s
-[`selects`](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/selects_doc.md)
+[`selects`](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/selects_doc.md)
module supports `OR`ing conditions directly inside a `select`:
```python
@@ -479,9 +479,9 @@
The
-[config_setting_group](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/selects_doc.md#selectsconfig_setting_group)
+[config_setting_group](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/selects_doc.md#selectsconfig_setting_group)
macro in [Skylib](https://github.com/bazelbuild/bazel-skylib)'s
-[`selects`](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/selects_doc.md)
+[`selects`](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/selects_doc.md)
module supports `OR`ing multiple `config_setting`s:
```python
@@ -522,7 +522,7 @@
If you need a `select` branch to match when multiple conditions match, use the
[Skylib](https://github.com/bazelbuild/bazel-skylib) macro
-[config_setting_group](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/selects_doc.md#selectsconfig_setting_group):
+[config_setting_group](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/selects_doc.md#selectsconfig_setting_group):
```python
config_setting(
diff --git a/site/docs/platforms.md b/site/docs/platforms.md
index 68d7d46..1e3199e 100644
--- a/site/docs/platforms.md
+++ b/site/docs/platforms.md
@@ -210,7 +210,7 @@
To make your constraints more readable, use
[skylib](https://github.com/bazelbuild/bazel-skylib)'s
-[`selects.with_or()`](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/selects_doc.md#selectswith_or).
+[`selects.with_or()`](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/selects_doc.md#selectswith_or).
You can express inverse compatibility in a similar way. The following example
describes a library that is compatible with everything _except_ for ARM.
diff --git a/site/docs/skylark/config.md b/site/docs/skylark/config.md
index 0958c6e..44e0f22 100644
--- a/site/docs/skylark/config.md
+++ b/site/docs/skylark/config.md
@@ -198,7 +198,7 @@
```
For a complete list, see
-[Common build setting rules](https://github.com/bazelbuild/bazel-skylib/blob/master/rules/common_settings.bzl).
+[Common build setting rules](https://github.com/bazelbuild/bazel-skylib/blob/main/rules/common_settings.bzl).
### Using build settings
diff --git a/site/docs/skylark/windows_tips.md b/site/docs/skylark/windows_tips.md
index b8b2601..1f960ce 100644
--- a/site/docs/skylark/windows_tips.md
+++ b/site/docs/skylark/windows_tips.md
@@ -172,38 +172,38 @@
Build rule examples:
- `copy_file()`
- ([source](https://github.com/bazelbuild/bazel-skylib/blob/master/rules/copy_file.bzl),
- [documentation](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/copy_file_doc.md)):
+ ([source](https://github.com/bazelbuild/bazel-skylib/blob/main/rules/copy_file.bzl),
+ [documentation](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/copy_file_doc.md)):
copies a file somewhere else, optionally making it executable
- `write_file()`
- ([source](https://github.com/bazelbuild/bazel-skylib/blob/master/rules/write_file.bzl),
- [documentation](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/write_file_doc.md)):
+ ([source](https://github.com/bazelbuild/bazel-skylib/blob/main/rules/write_file.bzl),
+ [documentation](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/write_file_doc.md)):
writes a text file, with the desired line endings (`auto`, `unix`, or `windows`), optionally
making it executable (if it's a script)
- `run_binary()`
- ([source](https://github.com/bazelbuild/bazel-skylib/blob/master/rules/run_binary.bzl),
- [documentation](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/run_binary_doc.md)):
+ ([source](https://github.com/bazelbuild/bazel-skylib/blob/main/rules/run_binary.bzl),
+ [documentation](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/run_binary_doc.md)):
runs a binary (or `*_binary` rule) with given inputs and expected outputs as a build action
(this is a build rule wrapper for `ctx.actions.run`)
- `native_binary()`
- ([source](https://github.com/bazelbuild/bazel-skylib/blob/master/rules/native_binary.bzl),
- [documentation](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/native_binary_doc.md#native_binary)):
+ ([source](https://github.com/bazelbuild/bazel-skylib/blob/main/rules/native_binary.bzl),
+ [documentation](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/native_binary_doc.md#native_binary)):
wraps a native binary in a `*_binary` rule, which you can `bazel run` or use in `run_binary()`'s
`tool` attribute or `native.genrule()`'s `tools` attribute
Test rule examples:
- `diff_test()`
- ([source](https://github.com/bazelbuild/bazel-skylib/blob/master/rules/diff_test.bzl),
- [documentation](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/diff_test_doc.md)):
+ ([source](https://github.com/bazelbuild/bazel-skylib/blob/main/rules/diff_test.bzl),
+ [documentation](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/diff_test_doc.md)):
test that compares contents of two files
- `native_test()`
- ([source](https://github.com/bazelbuild/bazel-skylib/blob/master/rules/native_binary.bzl),
- [documentation](https://github.com/bazelbuild/bazel-skylib/blob/master/docs/native_binary_doc.md#native_test)):
+ ([source](https://github.com/bazelbuild/bazel-skylib/blob/main/rules/native_binary.bzl),
+ [documentation](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/native_binary_doc.md#native_test)):
wraps a native binary in a `*_test` rule, which you can `bazel test`
- **On Windows, consider using `.bat` scripts for trivial things.**
diff --git a/site/docs/windows.md b/site/docs/windows.md
index f76a1de..e243bf9 100644
--- a/site/docs/windows.md
+++ b/site/docs/windows.md
@@ -80,11 +80,11 @@
- Starlark rule that uses `ctx.actions.run_shell()` or `ctx.resolve_command()`
However, `genrule` is often used for simple tasks like
-[copying a file](https://github.com/bazelbuild/bazel-skylib/blob/master/rules/copy_file.bzl)
-or [writing a text file](https://github.com/bazelbuild/bazel-skylib/blob/master/rules/write_file.bzl).
+[copying a file](https://github.com/bazelbuild/bazel-skylib/blob/main/rules/copy_file.bzl)
+or [writing a text file](https://github.com/bazelbuild/bazel-skylib/blob/main/rules/write_file.bzl).
Instead of using `genrule` (and depending on Bash) you may find a suitable rule
in the
-[bazel-skylib repository](https://github.com/bazelbuild/bazel-skylib/tree/master/rules).
+[bazel-skylib repository](https://github.com/bazelbuild/bazel-skylib/tree/main/rules).
When built on Windows, **these rules do not require Bash**.
<a name="bazel-test-without-bash"></a>