distro: drop NewDefaultRegistry()
Require the caller to pass in the required distros explicitly. This would allow us to easily add distros in osbuild-pipeline and tests before exposing them in composer itself, for instance. This means there is no longer a dependency from the distro package to each of the individual distros, so the distros are now able to depend on the distro packag for types and interfaces. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
08ff8ab81b
commit
ff0ec01eb6
4 changed files with 21 additions and 16 deletions
|
|
@ -10,6 +10,11 @@ import (
|
|||
"path"
|
||||
|
||||
"github.com/osbuild/osbuild-composer/internal/common"
|
||||
"github.com/osbuild/osbuild-composer/internal/distro/fedora30"
|
||||
"github.com/osbuild/osbuild-composer/internal/distro/fedora31"
|
||||
"github.com/osbuild/osbuild-composer/internal/distro/fedora32"
|
||||
"github.com/osbuild/osbuild-composer/internal/distro/rhel81"
|
||||
"github.com/osbuild/osbuild-composer/internal/distro/rhel82"
|
||||
|
||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||
|
|
@ -74,7 +79,7 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
distros, err := distro.NewDefaultRegistry()
|
||||
distros, err := distro.NewRegistry(fedora30.New(), fedora31.New(), fedora32.New(), rhel81.New(), rhel82.New())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue