Skip to content

Commit 8ef9420

Browse files
authored
Merge pull request #123 from containers/podman-v5.2.0
Podman v5.2.0
2 parents f93a4db + f3a88d9 commit 8ef9420

File tree

13 files changed

+1341
-90
lines changed

13 files changed

+1341
-90
lines changed

src/cli.rs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
mod build;
12
mod compose;
23
mod container;
34
mod generate;
@@ -36,9 +37,9 @@ use path_clean::PathClean;
3637
use crate::quadlet::{self, Downgrade, DowngradeError, Globals, HostPaths, PodmanVersion};
3738

3839
use self::{
39-
compose::Compose, container::Container, generate::Generate, global_args::GlobalArgs,
40-
image::Image, install::Install, kube::Kube, network::Network, pod::Pod, service::Service,
41-
unit::Unit, volume::Volume,
40+
build::Build, compose::Compose, container::Container, generate::Generate,
41+
global_args::GlobalArgs, image::Image, install::Install, kube::Kube, network::Network,
42+
pod::Pod, service::Service, unit::Unit, volume::Volume,
4243
};
4344

4445
#[allow(clippy::option_option)]
@@ -448,6 +449,16 @@ enum PodmanCommands {
448449
volume: Volume,
449450
},
450451

452+
/// Generate a Podman Quadlet `.build` file
453+
///
454+
/// For details on options see:
455+
/// https://docs.podman.io/en/stable/markdown/podman-build.1.html
456+
Build {
457+
/// The \[Build\] section
458+
#[command(flatten)]
459+
build: Box<Build>,
460+
},
461+
451462
/// Generate a Podman Quadlet `.image` file
452463
///
453464
/// For details on options see:
@@ -467,6 +478,7 @@ impl From<PodmanCommands> for quadlet::Resource {
467478
PodmanCommands::Kube { kube } => (*kube).into(),
468479
PodmanCommands::Network { network } => (*network).into(),
469480
PodmanCommands::Volume { volume } => volume.into(),
481+
PodmanCommands::Build { build } => (*build).into(),
470482
PodmanCommands::Image { image } => (*image).into(),
471483
}
472484
}
@@ -507,6 +519,7 @@ impl PodmanCommands {
507519
Self::Kube { kube } => kube.name(),
508520
Self::Network { network } => network.name(),
509521
Self::Volume { volume } => volume.name(),
522+
Self::Build { build } => build.name(),
510523
Self::Image { image } => image.name(),
511524
}
512525
}

0 commit comments

Comments
 (0)