Description of the feature request:
http_archive repositiory rule has strip_components integer attribute that removes the number of path components when extracting the archive.
Also, the repository_ctx.extract and repository.download_and_extract.
The naming is similar to tar --strip-components=NUMBER.
Which category does this issue belong to?
Rules API
What underlying problem are you trying to solve with this feature?
Archives often have a containing directories.
- Sometimes, this is long or not easily memorable -- a version number, or a commit hash
- Sometimes, this is not readily known. E.g. npm packages usually use a
package/ prefix, but not always.
Usually, users don't actually care what the leading component is, they just want to remove it.
Which operating system are you running Bazel on?
No response
What is the output of bazel info release?
No response
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse HEAD ?
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
Description of the feature request:
http_archiverepositiory rule hasstrip_componentsinteger attribute that removes the number of path components when extracting the archive.Also, the
repository_ctx.extractandrepository.download_and_extract.The naming is similar to tar --strip-components=NUMBER.
Which category does this issue belong to?
Rules API
What underlying problem are you trying to solve with this feature?
Archives often have a containing directories.
package/prefix, but not always.Usually, users don't actually care what the leading component is, they just want to remove it.
Which operating system are you running Bazel on?
No response
What is the output of
bazel info release?No response
If
bazel info releasereturnsdevelopment versionor(@non-git), tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD?Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response