diff --git a/cmd/lifecycle/analyzer.go b/cmd/lifecycle/analyzer.go index 292d98c17..070a1d169 100644 --- a/cmd/lifecycle/analyzer.go +++ b/cmd/lifecycle/analyzer.go @@ -30,11 +30,13 @@ func (a *analyzeCmd) DefineFlags() { cli.FlagStackPath(&a.StackPath) } switch { + case a.PlatformAPI.AtLeast("0.13"): + cli.FlagInsecureRegistries(&a.InsecureRegistries) + fallthrough case a.PlatformAPI.AtLeast("0.12"): cli.FlagLayoutDir(&a.LayoutDir) cli.FlagUseLayout(&a.UseLayout) cli.FlagRunPath(&a.RunPath) - cli.FlagInsecureRegistries(&a.InsecureRegistries) fallthrough case a.PlatformAPI.AtLeast("0.9"): cli.FlagLaunchCacheDir(&a.LaunchCacheDir) diff --git a/cmd/lifecycle/creator.go b/cmd/lifecycle/creator.go index aba9ffcd1..531da1d31 100644 --- a/cmd/lifecycle/creator.go +++ b/cmd/lifecycle/creator.go @@ -34,8 +34,12 @@ func (c *createCmd) DefineFlags() { cli.FlagLayoutDir(&c.LayoutDir) cli.FlagUseLayout(&c.UseLayout) cli.FlagRunPath(&c.RunPath) + } + + if c.PlatformAPI.AtLeast("0.13") { cli.FlagInsecureRegistries(&c.InsecureRegistries) } + if c.PlatformAPI.AtLeast("0.11") { cli.FlagBuildConfigDir(&c.BuildConfigDir) cli.FlagLauncherSBOMDir(&c.LauncherSBOMDir) diff --git a/cmd/lifecycle/exporter.go b/cmd/lifecycle/exporter.go index 8289573a2..bc9006e9e 100644 --- a/cmd/lifecycle/exporter.go +++ b/cmd/lifecycle/exporter.go @@ -54,10 +54,14 @@ func (e *exportCmd) DefineFlags() { cli.FlagLayoutDir(&e.LayoutDir) cli.FlagRunPath(&e.RunPath) cli.FlagUseLayout(&e.UseLayout) - cli.FlagInsecureRegistries(&e.InsecureRegistries) } else { cli.FlagStackPath(&e.StackPath) } + + if e.PlatformAPI.AtLeast("0.13") { + cli.FlagInsecureRegistries(&e.InsecureRegistries) + } + if e.PlatformAPI.AtLeast("0.11") { cli.FlagLauncherSBOMDir(&e.LauncherSBOMDir) } diff --git a/cmd/lifecycle/rebaser.go b/cmd/lifecycle/rebaser.go index f6241ddd8..448beb924 100644 --- a/cmd/lifecycle/rebaser.go +++ b/cmd/lifecycle/rebaser.go @@ -46,6 +46,9 @@ func (r *rebaseCmd) DefineFlags() { if r.PlatformAPI.AtLeast("0.12") { cli.FlagForceRebase(&r.ForceRebase) + } + + if r.PlatformAPI.AtLeast("0.13") { cli.FlagInsecureRegistries(&r.InsecureRegistries) } } diff --git a/cmd/lifecycle/restorer.go b/cmd/lifecycle/restorer.go index 4ffb41ef2..536d61cd5 100644 --- a/cmd/lifecycle/restorer.go +++ b/cmd/lifecycle/restorer.go @@ -42,11 +42,16 @@ func (r *restoreCmd) DefineFlags() { cli.FlagGeneratedDir(&r.GeneratedDir) cli.FlagUseLayout(&r.UseLayout) cli.FlagLayoutDir(&r.LayoutDir) + } + + if r.PlatformAPI.AtLeast("0.13") { cli.FlagInsecureRegistries(&r.InsecureRegistries) } + if r.PlatformAPI.AtLeast("0.10") { cli.FlagBuildImage(&r.BuildImageRef) } + cli.FlagAnalyzedPath(&r.AnalyzedPath) cli.FlagCacheDir(&r.CacheDir) cli.FlagCacheImage(&r.CacheImageRef)