feat: Add platform arg to force building a specific architecture
This commit is contained in:
parent
20d1950530
commit
75eae89e4a
22 changed files with 408 additions and 71 deletions
|
|
@ -6,7 +6,7 @@ use miette::{bail, miette, IntoDiagnostic, Result};
|
|||
use semver::Version;
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::logging::CommandLogging;
|
||||
use crate::{drivers::types::Platform, logging::CommandLogging};
|
||||
|
||||
use super::{
|
||||
opts::{BuildOpts, PushOpts, TagOpts},
|
||||
|
|
@ -50,6 +50,10 @@ impl BuildDriver for BuildahDriver {
|
|||
let command = cmd!(
|
||||
"buildah",
|
||||
"build",
|
||||
if !matches!(opts.platform, Platform::Native) => [
|
||||
"--platform",
|
||||
opts.platform.to_string(),
|
||||
],
|
||||
"--pull=true",
|
||||
format!("--layers={}", !opts.squash),
|
||||
"-f",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue