This commit adds a new `--output-dir` option to override the default output directory for the generated artifacts. Note that this can also be used together with `manifest` when extra artifacts (like the sbom) is requested.
19 lines
585 B
Go
19 lines
585 B
Go
package main
|
|
|
|
import (
|
|
"github.com/osbuild/images/pkg/imagefilter"
|
|
"github.com/osbuild/images/pkg/osbuild"
|
|
)
|
|
|
|
func buildImage(res *imagefilter.Result, osbuildManifest []byte, osbuildStoreDir, outputDir string) error {
|
|
// XXX: support output filename via commandline (c.f.
|
|
// https://github.com/osbuild/images/pull/1039)
|
|
if outputDir == "" {
|
|
outputDir = outputDirFor(res)
|
|
}
|
|
|
|
// XXX: support stremaing via images/pkg/osbuild/monitor.go
|
|
_, err := osbuild.RunOSBuild(osbuildManifest, osbuildStoreDir, outputDir, res.ImgType.Exports(), nil, nil, false, osStderr)
|
|
return err
|
|
|
|
}
|