Minor flagging cleanup
Add an underscore to make the linter more happy. Bug: 339672075 Bug: 328495189 Test: manual Change-Id: I6b1d6dcd0aff3c82551021b3f4768a34f27d6fb2
This commit is contained in:
@@ -16,8 +16,8 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
// When a flag declaration has an initial value that is a string, the default workflow is WorkflowPrebuilt.
|
||||
// If the flag name starts with any of prefixes in manualFlagNamePrefixes, it is WorkflowManual.
|
||||
// When a flag declaration has an initial value that is a string, the default workflow is Workflow_Prebuilt.
|
||||
// If the flag name starts with any of prefixes in manualFlagNamePrefixes, it is Workflow_Manual.
|
||||
manualFlagNamePrefixes []string = []string{
|
||||
"RELEASE_ACONFIG_",
|
||||
"RELEASE_PLATFORM_",
|
||||
@@ -133,8 +133,8 @@ func ProcessBuildFlags(dir string, namespaceMap map[string]string) error {
|
||||
Containers: containers,
|
||||
}
|
||||
description = ""
|
||||
// Most build flags are `workflow: WorkflowPrebuilt`.
|
||||
workflow := rc_proto.Workflow(rc_proto.Workflow_WorkflowPrebuilt)
|
||||
// Most build flags are `workflow: Workflow_Prebuilt`.
|
||||
workflow := rc_proto.Workflow(rc_proto.Workflow_Workflow_Prebuilt)
|
||||
switch {
|
||||
case declName == "RELEASE_ACONFIG_VALUE_SETS":
|
||||
if strings.HasPrefix(declValue, "\"") {
|
||||
@@ -142,21 +142,21 @@ func ProcessBuildFlags(dir string, namespaceMap map[string]string) error {
|
||||
}
|
||||
continue
|
||||
case strings.HasPrefix(declValue, "\""):
|
||||
// String values mean that the flag workflow is (most likely) either WorkflowManual or WorkflowPrebuilt.
|
||||
// String values mean that the flag workflow is (most likely) either Workflow_Manual or Workflow_Prebuilt.
|
||||
declValue = declValue[1 : len(declValue)-1]
|
||||
flagDeclaration.Value = &rc_proto.Value{Val: &rc_proto.Value_StringValue{declValue}}
|
||||
for _, prefix := range manualFlagNamePrefixes {
|
||||
if strings.HasPrefix(declName, prefix) {
|
||||
workflow = rc_proto.Workflow(rc_proto.Workflow_WorkflowManual)
|
||||
workflow = rc_proto.Workflow(rc_proto.Workflow_Workflow_Manual)
|
||||
break
|
||||
}
|
||||
}
|
||||
case declValue == "False" || declValue == "True":
|
||||
// Boolean values are WorkflowLaunch flags.
|
||||
// Boolean values are Workflow_Launch flags.
|
||||
flagDeclaration.Value = &rc_proto.Value{Val: &rc_proto.Value_BoolValue{declValue == "True"}}
|
||||
workflow = rc_proto.Workflow(rc_proto.Workflow_WorkflowLaunch)
|
||||
workflow = rc_proto.Workflow(rc_proto.Workflow_Workflow_Launch)
|
||||
case declValue == "None":
|
||||
// Use WorkflowPrebuilt workflow with no initial value.
|
||||
// Use Workflow_Prebuilt workflow with no initial value.
|
||||
default:
|
||||
fmt.Printf("%s: Unexpected value %s=%s\n", path, declName, declValue)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user