diff options
author | 2015-07-29 08:22:53 +0000 | |
---|---|---|
committer | 2015-07-29 16:02:19 +0000 | |
commit | 1f16e3e3301492a5644c4fcbf157c80e26bf1b8b (patch) | |
tree | 5d035fe16d56167bc68fcbe48c9cc03b5e0bf531 /src/main/java | |
parent | 6c7ef224d700c25f14581f2a290fbc01d5232011 (diff) |
Clarify the behavior of the "type" attribute for http_archive and new_http_archive rules.
--
MOS_MIGRATED_REVID=99355182
Diffstat (limited to 'src/main/java')
2 files changed, 14 insertions, 14 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/HttpArchiveRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/HttpArchiveRule.java index 774fcb21e8..7db72e72cd 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/HttpArchiveRule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/HttpArchiveRule.java @@ -34,11 +34,11 @@ public class HttpArchiveRule implements RuleDefinition { public RuleClass build(Builder builder, RuleDefinitionEnvironment environment) { return builder /* <!-- #BLAZE_RULE(http_archive).ATTRIBUTE(url) --> - A URL to an archive file containing a Bazel repository. + A URL referencing an archive file containing a Bazel repository. ${SYNOPSIS} - <p>This must be an HTTP URL that ends with .zip. There is no support for authentication or - redirection.</p> + <p>Archives of type .zip, .jar, .war, .tar.gz or .tgz are supported. There is no support + for authentication or redirection.</p> <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add(attr("url", STRING).mandatory()) /* <!-- #BLAZE_RULE(http_archive).ATTRIBUTE(sha256) --> @@ -49,12 +49,12 @@ public class HttpArchiveRule implements RuleDefinition { <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add(attr("sha256", STRING).mandatory()) /* <!-- #BLAZE_RULE(http_archive).ATTRIBUTE(type) --> - The type of the downloaded file. + The archive type of the downloaded file. ${SYNOPSIS} - <p>By default, the file type is guessed by the extension of the downloaded file. Some - archive does not have the correct extension and this attribute can be used to set the - extension to happen to the file.</p> + <p>By default, the archive type is determined from the file extension of the URL. If the + file has no extension, you can explicitly specify either "zip", "jar", "tar.gz", or + "tgz" here.</p> <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add(attr("type", STRING)) .setWorkspaceOnly() diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewHttpArchiveRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewHttpArchiveRule.java index 3373790adb..11c46a7ec2 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewHttpArchiveRule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewHttpArchiveRule.java @@ -31,11 +31,11 @@ public class NewHttpArchiveRule implements RuleDefinition { public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment environment) { return builder /* <!-- #BLAZE_RULE(new_http_archive).ATTRIBUTE(url) --> - A URL to an archive file containing a Bazel repository. + A URL referencing an archive file containing a Bazel repository. ${SYNOPSIS} - <p>This must be an HTTP URL that ends with .zip. There is no support for authentication or - redirection.</p> + <p>Archives of type .zip, .jar, .war, .tar.gz or .tgz are supported. There is no support + for authentication or redirection.</p> <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add(attr("url", STRING).mandatory()) /* <!-- #BLAZE_RULE(new_http_archive).ATTRIBUTE(sha256) --> @@ -55,12 +55,12 @@ public class NewHttpArchiveRule implements RuleDefinition { <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add(attr("build_file", STRING).mandatory()) /* <!-- #BLAZE_RULE(new_http_archive).ATTRIBUTE(type) --> - The type of the downloaded file. + The archive type of the downloaded file. ${SYNOPSIS} - <p>By default, the file type is guessed by the extension of the downloaded file. Some - archive does not have the correct extension and this attribute can be used to set the - extension to happen to the file.</p> + <p>By default, the archive type is determined from the file extension of the URL. If the + file has no extension, you can explicitly specify either "zip", "jar", "tar.gz", or + "tgz" here.</p> <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add(attr("type", STRING)) .setWorkspaceOnly() |