2022-04-04 00:52:03 +00:00
|
|
|
"""A rule that copies a directory to another place.
|
|
|
|
|
2024-09-10 17:08:34 +00:00
|
|
|
The rule uses a precompiled binary to perform the copy, so no shell is required.
|
2024-09-18 00:25:26 +00:00
|
|
|
|
|
|
|
## Preserving modification times
|
|
|
|
|
|
|
|
`copy_directory` and `copy_to_directory` have a `preserve_mtime` attribute, however
|
|
|
|
there are two caveats to consider when using this feature:
|
|
|
|
|
|
|
|
1. Remote Execution / Caching: These layers will reset the modify time and are
|
|
|
|
incompatible with this feature. To avoid these failures the [no-remote tag](https://bazel.build/reference/be/common-definitions)
|
|
|
|
can be added.
|
|
|
|
2. Caching: Changes to only the modified time will not re-trigger cached actions. This can
|
|
|
|
be worked around by using a clean build when these types of changes occur. For tests the
|
|
|
|
[external tag](https://bazel.build/reference/be/common-definitions) can be used but this
|
|
|
|
will result in tests never being cached.
|
2022-04-04 00:52:03 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
load(
|
|
|
|
"//lib/private:copy_directory.bzl",
|
|
|
|
_copy_directory = "copy_directory",
|
2023-01-17 01:19:13 +00:00
|
|
|
_copy_directory_bin_action = "copy_directory_bin_action",
|
2022-04-04 00:52:03 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
copy_directory = _copy_directory
|
2023-01-17 01:19:13 +00:00
|
|
|
copy_directory_bin_action = _copy_directory_bin_action
|