aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@cardoe.com>2020-06-18 08:15:57 -0500
committerGitHub <noreply@github.com>2020-06-18 08:15:57 -0500
commit7ce19ef4a8ddd1fd0edacf4134b2ca6e152d1f82 (patch)
treedbf371a823bee14c3eb16c91a6d2f3fe2b40adfc
parent(cargo-release) start next development iteration 0.3.1-alpha.0 (diff)
parentfixed local crates being added to ebuild (diff)
downloadcargo-ebuild-7ce19ef4a8ddd1fd0edacf4134b2ca6e152d1f82.tar.gz
cargo-ebuild-7ce19ef4a8ddd1fd0edacf4134b2ca6e152d1f82.tar.bz2
cargo-ebuild-7ce19ef4a8ddd1fd0edacf4134b2ca6e152d1f82.zip
Merge pull request #35 from leonardohn/local-crate-fix
Fixed local crates being added to ebuild
-rw-r--r--src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 2eff106..2ee9cf3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -55,7 +55,11 @@ pub fn gen_ebuild_data(manifest_path: Option<PathBuf>) -> Result<EbuildConfig> {
root_pkg = Some(pkg.clone());
}
- crates.push(format!("{}-{}\n", pkg.name, pkg.version));
+ if let Some(src) = pkg.source {
+ if src.is_crates_io() {
+ crates.push(format!("{}-{}\n", pkg.name, pkg.version));
+ }
+ }
if let Some(lic_list) = pkg.license.as_ref().map(|l| parse_license(&l)) {
for lic in lic_list.iter() {