transmit: send README filename as well as content

This commit is contained in:
Ashe Connor 2017-10-17 16:04:33 +11:00
parent 361857e00a
commit 76a69b4cb8
No known key found for this signature in database
GPG key ID: 44A3D2C95E26BB14
2 changed files with 4 additions and 2 deletions

View file

@ -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,
};
@ -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(),

View file

@ -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>,