mirror of
https://github.com/bazelbuild/bazel-skylib
synced 2024-11-28 08:43:51 +00:00
99ffbbf8a4
And take the opportunity to reformat docs using a more modern Stardoc release
1.8 KiB
Executable file
1.8 KiB
Executable file
A rule that writes a UTF-8 encoded text file from user-specified contents.
native.genrule() is sometimes used to create a text file. The 'write_file' and macro does this with a simpler interface than genrule.
The rules generated by the macro do not use Bash or any other shell to write the file. Instead they use Starlark's built-in file writing action (ctx.actions.write).
write_file
write_file(name, out, content, is_executable, newline, kwargs)
Creates a UTF-8 encoded text file.
PARAMETERS