Make release_config.bzl match internal
To avoid merge conflicts. These are buildifier errors that will be
fixed in a followup cl.
Test: presubmits
Change-Id: I22c91c796aee16ef16f05471c2ff5221fa41d7b3
diff --git a/core/release_config.bzl b/core/release_config.bzl
index 805106f..ca7927e 100644
--- a/core/release_config.bzl
+++ b/core/release_config.bzl
@@ -41,16 +41,17 @@
if len(partitions) > 1:
fail("\"all\" can't be combined with other partitions: " + str(partitions))
elif partition not in _flag_partitions:
- fail("Invalid partition: " + partition + ", allowed partitions: " +
- str(_flag_partitions))
+ fail("Invalid partition: " + partition + ", allowed partitions: "
+ + str(_flag_partitions))
if type(default) not in _valid_types:
fail("Invalid type of default for flag \"" + name + "\" (" + type(default) + ")")
return {
"name": name,
"partitions": partitions,
- "default": default,
+ "default": default
}
+
def value(name, value):
"Define the flag value for a particular configuration."
return {
@@ -58,6 +59,7 @@
"value": value,
}
+
def _format_value(val):
"Format the starlark type correctly for make"
if type(val) == "NoneType":
@@ -67,9 +69,9 @@
else:
return val
+
def release_config(all_flags, all_values):
"Return the make variables that should be set for this release config."
-
# Validate flags
flag_names = []
for flag in all_flags:
@@ -119,3 +121,4 @@
result["_ALL_RELEASE_FLAGS." + flag["name"] + ".SET_IN"] = set_in
return result
+