mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
Publish gbafix
This commit is contained in:
parent
fc5ce97db4
commit
70979fc7da
|
@ -39,7 +39,9 @@ pub fn publish(matches: &ArgMatches) -> Result<(), Error> {
|
||||||
let mut published_crates: HashSet<String> = HashSet::new();
|
let mut published_crates: HashSet<String> = HashSet::new();
|
||||||
|
|
||||||
let dependencies = build_dependency_graph(&root_directory)?;
|
let dependencies = build_dependency_graph(&root_directory)?;
|
||||||
let crates_to_publish: Vec<_> = dependencies.keys().collect();
|
let mut crates_to_publish: Vec<_> = dependencies.keys().collect();
|
||||||
|
let agb_gbafix = "agb-gbafix".to_owned();
|
||||||
|
crates_to_publish.push(&agb_gbafix);
|
||||||
|
|
||||||
while published_crates.len() != crates_to_publish.len() {
|
while published_crates.len() != crates_to_publish.len() {
|
||||||
// find all crates which can be published now but haven't
|
// find all crates which can be published now but haven't
|
||||||
|
@ -47,10 +49,13 @@ pub fn publish(matches: &ArgMatches) -> Result<(), Error> {
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|&&crate_to_publish| !published_crates.contains(crate_to_publish))
|
.filter(|&&crate_to_publish| !published_crates.contains(crate_to_publish))
|
||||||
.filter(|&&crate_to_publish| {
|
.filter(|&&crate_to_publish| {
|
||||||
let dependencies_of_crate = &dependencies[crate_to_publish];
|
let dependencies_of_crate = &dependencies.get(crate_to_publish);
|
||||||
for dependency_of_crate in dependencies_of_crate {
|
|
||||||
if !fully_published_crates.contains(dependency_of_crate) {
|
if let Some(dependencies_of_crate) = dependencies_of_crate {
|
||||||
return false;
|
for dependency_of_crate in *dependencies_of_crate {
|
||||||
|
if !fully_published_crates.contains(dependency_of_crate) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue