Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mwu-tow committed Jun 8, 2022
1 parent e911b29 commit fa5f43d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
10 changes: 10 additions & 0 deletions build/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@ impl BuiltBundleArtifacts {
}
}

impl IntoIterator for BuiltBundleArtifacts {
type Item = ComponentPaths;
type IntoIter =
std::iter::Flatten<std::array::IntoIter<std::option::Option<ComponentPaths>, 2_usize>>;

fn into_iter(self) -> Self::IntoIter {
[self.launcher, self.project_manager].into_iter().flatten()
}
}

pub async fn create_packages(paths: &Paths) -> Result<Vec<PathBuf>> {
let mut ret = Vec::new();
if paths.launcher.root.exists() {
Expand Down
20 changes: 10 additions & 10 deletions build/src/engine/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,16 +400,16 @@ impl RunContext {
)
.await?;
}
// for bundle in artifacts.bundles.iter() {
// bundle.pack().await?;
// ide_ci::github::release::upload_asset(
// repo,
// &client,
// release_id,
// &bundle.artifact_archive,
// )
// .await?;
// }
for bundle in artifacts.bundles.into_iter() {
bundle.pack().await?;
ide_ci::github::release::upload_asset(
repo,
&client,
release_id,
bundle.artifact_archive,
)
.await?;
}
}
},
Operation::Run(run) => {
Expand Down

0 comments on commit fa5f43d

Please sign in to comment.