Accept arbitrary filenames into URLs in build-manifest

instead of combining the component and target into a URL.
This commit is contained in:
Andrea Canciani 2017-04-25 16:08:14 +02:00
parent c7e724a148
commit ac8892bdb2

View file

@ -293,7 +293,7 @@ impl Builder {
pkg.target.insert(host.to_string(), Target {
available: true,
url: Some(self.url("rust", host)),
url: Some(self.url(&filename)),
hash: Some(digest),
components: Some(components),
extensions: Some(extensions),
@ -325,7 +325,7 @@ impl Builder {
(name.to_string(), Target {
available: true,
url: Some(self.url(pkgname, name)),
url: Some(self.url(&filename)),
hash: Some(digest),
components: None,
extensions: None,
@ -338,11 +338,11 @@ impl Builder {
});
}
fn url(&self, component: &str, target: &str) -> String {
fn url(&self, filename: &str) -> String {
format!("{}/{}/{}",
self.s3_address,
self.date,
self.filename(component, target))
filename)
}
fn filename(&self, component: &str, target: &str) -> String {