filters: add new getOneImage() helper for manifest/build
This commit adds a helper to find exactly a single image from a given disto/type/arch description. This will be used in `manifest`, `build` and potentially more. It is meant to support copy/paste from the `image-builder list-images` output, so: "distro:centos-9" is support just like "centos-9" (same for distro/imgType/arch).
This commit is contained in:
parent
7f9936acc9
commit
e9e8dc5256
3 changed files with 106 additions and 0 deletions
|
|
@ -8,6 +8,10 @@ import (
|
|||
"github.com/osbuild/images/pkg/reporegistry"
|
||||
)
|
||||
|
||||
var (
|
||||
GetOneImage = getOneImage
|
||||
)
|
||||
|
||||
func MockOsArgs(new []string) (restore func()) {
|
||||
saved := os.Args
|
||||
os.Args = append([]string{"argv0"}, new...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue