Skip to content

Commit

Permalink
Accept arbitrary filenames into URLs in build-manifest
Browse files Browse the repository at this point in the history
instead of combining the component and target into a URL.
  • Loading branch information
ranma42 committed Apr 25, 2017
1 parent c7e724a commit ac8892b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tools/build-manifest/src/main.rs
Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand All @@ -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 {
Expand Down

0 comments on commit ac8892b

Please sign in to comment.