Merge "Write product config files only if changed."
This commit is contained in:
@@ -397,11 +397,13 @@ product_var_constraints = _product_var_constraints
|
|||||||
arch_variant_product_var_constraints = _arch_variant_product_var_constraints
|
arch_variant_product_var_constraints = _arch_variant_product_var_constraints
|
||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
err = os.WriteFile(filepath.Join(dir, "product_variables.bzl"), []byte(strings.Join(bzl, "\n")), 0644)
|
err = pathtools.WriteFileIfChanged(filepath.Join(dir, "product_variables.bzl"),
|
||||||
|
[]byte(strings.Join(bzl, "\n")), 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Could not write .bzl config file %s", err)
|
return fmt.Errorf("Could not write .bzl config file %s", err)
|
||||||
}
|
}
|
||||||
err = os.WriteFile(filepath.Join(dir, "BUILD"), []byte(bazel.GeneratedBazelFileWarning), 0644)
|
err = pathtools.WriteFileIfChanged(filepath.Join(dir, "BUILD"),
|
||||||
|
[]byte(bazel.GeneratedBazelFileWarning), 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Could not write BUILD config file %s", err)
|
return fmt.Errorf("Could not write BUILD config file %s", err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user