diff --git a/docs/tar.md b/docs/tar.md index ef0e63d4b..22af0d94f 100644 --- a/docs/tar.md +++ b/docs/tar.md @@ -110,3 +110,58 @@ https://man.freebsd.org/cgi/man.cgi?mtree(8) | kwargs | additional named parameters to pass to tar_rule | none | + + +## tar_lib.implementation + +
+tar_lib.implementation(ctx)
+
+ + + +**PARAMETERS** + + +| Name | Description | Default Value | +| :------------- | :------------- | :------------- | +| ctx |

-

| none | + + + + +## tar_lib.mtree_implementation + +
+tar_lib.mtree_implementation(ctx)
+
+ + + +**PARAMETERS** + + +| Name | Description | Default Value | +| :------------- | :------------- | :------------- | +| ctx |

-

| none | + + + + +## tar_lib.common.add_compression_args + +
+tar_lib.common.add_compression_args(compress, args)
+
+ + + +**PARAMETERS** + + +| Name | Description | Default Value | +| :------------- | :------------- | :------------- | +| compress |

-

| none | +| args |

-

| none | + + diff --git a/lib/tar.bzl b/lib/tar.bzl index 172c07e1b..23e4693b4 100644 --- a/lib/tar.bzl +++ b/lib/tar.bzl @@ -20,16 +20,18 @@ TODO: load("@bazel_skylib//lib:types.bzl", "types") load("@bazel_skylib//rules:write_file.bzl", "write_file") -load("//lib/private:tar.bzl", "tar_lib", _tar = "tar") +load("//lib/private:tar.bzl", _tar = "tar", _tar_lib = "tar_lib") mtree_spec = rule( doc = "Create an mtree specification to map a directory hierarchy. See https://man.freebsd.org/cgi/man.cgi?mtree(8)", - implementation = tar_lib.mtree_implementation, - attrs = tar_lib.mtree_attrs, + implementation = _tar_lib.mtree_implementation, + attrs = _tar_lib.mtree_attrs, ) tar_rule = _tar +tar_lib = _tar_lib + def tar(name, mtree = "auto", **kwargs): """Wrapper macro around [`tar_rule`](#tar_rule).