Skip to content

Commit

Permalink
Auto merge of #4633 - kivikakk:readme-file, r=carols10cents
Browse files Browse the repository at this point in the history
transmit: send README filename as well as content

This is required to solve rust-lang/crates.io#995; we currently only send the README content, but not the name of the README itself, so it's not possible to determine how we should render it.

I've confirmed the existing crates.io server silently ignores the new field, so this should be safe to roll out whenever.
  • Loading branch information
bors committed Oct 18, 2017
2 parents 7c47eeb + 76a69b4 commit 757c3fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cargo/ops/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ fn transmit(config: &Config,
ref keywords, ref readme, ref repository, ref license, ref license_file,
ref categories, ref badges,
} = *manifest.metadata();
let readme = match *readme {
let readme_content = match *readme {
Some(ref readme) => Some(paths::read(&pkg.root().join(readme))?),
None => None,
};
Expand All @@ -146,7 +146,8 @@ fn transmit(config: &Config,
documentation: documentation.clone(),
keywords: keywords.clone(),
categories: categories.clone(),
readme: readme,
readme: readme_content,
readme_file: readme.clone(),
repository: repository.clone(),
license: license.clone(),
license_file: license_file.clone(),
Expand Down
1 change: 1 addition & 0 deletions src/crates-io/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ pub struct NewCrate {
pub documentation: Option<String>,
pub homepage: Option<String>,
pub readme: Option<String>,
pub readme_file: Option<String>,
pub keywords: Vec<String>,
pub categories: Vec<String>,
pub license: Option<String>,
Expand Down

0 comments on commit 757c3fa

Please sign in to comment.