1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-04 01:24:09 +02:00

add command to update images

This commit is contained in:
Robin Appelman 2025-08-26 17:13:18 +02:00
commit 85335d84de
5 changed files with 93 additions and 44 deletions

View file

@ -67,7 +67,7 @@ impl FromStr for PhpVersion {
}
impl PhpVersion {
fn image(&self) -> &'static str {
pub fn image(&self) -> &'static str {
// for now only 7.4
match self {
PhpVersion::Php73 => "icewind1991/haze:7.3",
@ -127,6 +127,26 @@ impl PhpVersion {
}
}
pub fn all() -> impl Iterator<Item = Self> {
[
PhpVersion::Php73,
PhpVersion::Php74,
PhpVersion::Php80,
PhpVersion::Php81,
PhpVersion::Php82,
PhpVersion::Php83,
PhpVersion::Php84,
PhpVersion::Php73Dbg,
PhpVersion::Php74Dbg,
PhpVersion::Php80Dbg,
PhpVersion::Php81Dbg,
PhpVersion::Php82Dbg,
PhpVersion::Php83Dbg,
PhpVersion::Php84Dbg,
]
.into_iter()
}
#[allow(clippy::too_many_arguments)]
pub async fn spawn(
&self,