chore: add example of using write_source_file to merge output tree artifact files with source files that are already in an output directory (#730)

This commit is contained in:
Greg Magolan 2024-01-22 21:03:31 -08:00 committed by GitHub
parent 83b9e7a773
commit 1baf14f65c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,20 @@
load("//lib:copy_to_directory.bzl", "copy_to_directory")
load("//lib/private:write_source_file.bzl", "write_source_file")
copy_to_directory(
name = "desired",
srcs = [
"somefile",
"//lib/tests/write_source_files/merged_dir/out:BUILD.bazel",
],
root_paths = [
".",
"lib/tests/write_source_files/merged_dir/out",
],
)
write_source_file(
name = "merged_dir_test",
in_file = ":desired",
out_file = ":out",
)

View File

@ -0,0 +1 @@
exports_files(["BUILD.bazel"])

View File

@ -0,0 +1 @@
aaa

View File

@ -0,0 +1 @@
aaa