Skip to content

Commit

Permalink
Fix #28 firecracker install failure
Browse files Browse the repository at this point in the history
  • Loading branch information
innobead committed Feb 7, 2021
1 parent 89a557e commit 7cf677e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
10 changes: 6 additions & 4 deletions generated/packages/firecracker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ source:
targets:
- LinuxAmd64:
artifact_templates:
- "firecracker-v{version}-x86_64"
- "jailer-v{version}-x86_64"
- "Firecracker-v{version}-x86_64.tgz"
scan_dirs:
- "release-v{version}"
- LinuxArm64:
artifact_templates:
- "firecracker-v{version}-aarch64"
- "jailer-v{version}-aarch64"
- "Firecracker-v{version}-aarch64.tgz"
scan_dirs:
- "release-v{version}"
detail: ~
7 changes: 6 additions & 1 deletion src/common/src/model/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,12 @@ impl Package {
if let Some(extra_scan_dirs) = self.target()?.scan_dirs {
let mut extra_scan_dirs: Vec<PathBuf> = extra_scan_dirs
.into_iter()
.map(|x| pkg_dir.join(x))
.map(|x| {
pkg_dir.join(x.replace(
"{version}",
self.version.as_ref().unwrap().trim_start_matches("v"),
))
})
.collect();
scan_dirs.append(&mut extra_scan_dirs);
}
Expand Down
14 changes: 4 additions & 10 deletions src/generator/src/pkg/firecracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,24 @@ pub fn release() -> Package {
detail: None,
targets: vec![
PackageTargetType::LinuxAmd64(PackageManagement {
artifact_templates: vec![
"firecracker-v{version}-x86_64".to_string(),
"jailer-v{version}-x86_64".to_string(),
],
artifact_templates: vec!["Firecracker-v{version}-x86_64.tgz".to_string()],
executable_templates: None,
executable_mappings: None,
install_commands: None,
uninstall_commands: None,
upgrade_commands: None,
tag_version_regex_template: None,
scan_dirs: None,
scan_dirs: Some(vec!["release-v{version}".to_string()]),
}),
PackageTargetType::LinuxArm64(PackageManagement {
artifact_templates: vec![
"firecracker-v{version}-aarch64".to_string(),
"jailer-v{version}-aarch64".to_string(),
],
artifact_templates: vec!["Firecracker-v{version}-aarch64.tgz".to_string()],
executable_templates: None,
executable_mappings: None,
install_commands: None,
uninstall_commands: None,
upgrade_commands: None,
tag_version_regex_template: None,
scan_dirs: None,
scan_dirs: Some(vec!["release-v{version}".to_string()]),
}),
],
version: None,
Expand Down

0 comments on commit 7cf677e

Please sign in to comment.