Support release configs with only aconfig flags

Release configs with `aconfig_flags_only: true` can inherit build flag
values, but cannot set them.

Bug: 328495189
Test: manual
Change-Id: I2bdc88761d61fb20f10dc734f2ba87114f51b859
This commit is contained in:
LaMont Jones
2024-04-30 09:06:20 -07:00
parent d58ac5358d
commit dc86819307
6 changed files with 83 additions and 38 deletions

View File

@@ -160,6 +160,9 @@ func SetCommand(configs *rc_lib.ReleaseConfigs, commonFlags Flags, cmd string, a
if err != nil {
return err
}
if release.AconfigFlagsOnly {
return fmt.Errorf("%s does not allow build flag overrides", targetRelease)
}
flagArtifact, ok := release.FlagArtifacts[name]
if !ok {
return fmt.Errorf("Unknown build flag %s", name)