Allow specifying a build variant
Test: multiproduct_kati --variant userdebug Change-Id: I6548889caf868cad6270110c038753d029247572
This commit is contained in:
@@ -51,6 +51,8 @@ var outDir = flag.String("out", "", "path to store output directories (defaults
|
|||||||
var onlyConfig = flag.Bool("only-config", false, "Only run product config (not Soong or Kati)")
|
var onlyConfig = flag.Bool("only-config", false, "Only run product config (not Soong or Kati)")
|
||||||
var onlySoong = flag.Bool("only-soong", false, "Only run product config and Soong (not Kati)")
|
var onlySoong = flag.Bool("only-soong", false, "Only run product config and Soong (not Kati)")
|
||||||
|
|
||||||
|
var buildVariant = flag.String("variant", "eng", "build variant to use")
|
||||||
|
|
||||||
type Product struct {
|
type Product struct {
|
||||||
ctx build.Context
|
ctx build.Context
|
||||||
config build.Config
|
config build.Config
|
||||||
@@ -225,7 +227,7 @@ func main() {
|
|||||||
|
|
||||||
productConfig := build.NewConfig(productCtx)
|
productConfig := build.NewConfig(productCtx)
|
||||||
productConfig.Environment().Set("OUT_DIR", productOutDir)
|
productConfig.Environment().Set("OUT_DIR", productOutDir)
|
||||||
productConfig.Lunch(productCtx, product, "eng")
|
productConfig.Lunch(productCtx, product, *buildVariant)
|
||||||
|
|
||||||
build.Build(productCtx, productConfig, build.BuildProductConfig)
|
build.Build(productCtx, productConfig, build.BuildProductConfig)
|
||||||
productConfigs <- Product{productCtx, productConfig}
|
productConfigs <- Product{productCtx, productConfig}
|
||||||
|
Reference in New Issue
Block a user