Skip to content

Commit

Permalink
docs: add a note in pkg_tar#strip_prefix about flattening
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchabran committed May 27, 2023
1 parent e7a1ba1 commit aea720b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/0.8.0/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ pkg_tar(<a href="#pkg_tar-name">name</a>, <a href="#pkg_tar-build_tar">build_tar
| <a id="pkg_tar-remap_paths"></a>remap_paths | - | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
| <a id="pkg_tar-srcs"></a>srcs | - | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <a id="pkg_tar-stamp"></a>stamp | Enable file time stamping. Possible values: <li>stamp = 1: Use the time of the build as the modification time of each file in the archive. <li>stamp = 0: Use an "epoch" time for the modification time of each file. This gives good build result caching. <li>stamp = -1: Control the chosen modification time using the --[no]stamp flag. <div class="since"><i>Since 0.5.0</i></div> | Integer | optional | 0 |
| <a id="pkg_tar-strip_prefix"></a>strip_prefix | - | String | optional | "" |
| <a id="pkg_tar-strip_prefix"></a>strip_prefix | (note: strip_prefix = "." will prevent srcs to be flattened) | String | optional | "" |
| <a id="pkg_tar-symlinks"></a>symlinks | - | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |


Expand Down
4 changes: 3 additions & 1 deletion pkg/private/tar/tar.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ def _pkg_tar_impl(ctx):
pkg_tar_impl = rule(
implementation = _pkg_tar_impl,
attrs = {
"strip_prefix": attr.string(),
"strip_prefix": attr.string(
doc = """(note: strip_prefix = "." will prevent srcs to be flattened)"""
),
"package_dir": attr.string(
doc = """Prefix to be prepend to all paths written."""
),
Expand Down

0 comments on commit aea720b

Please sign in to comment.