Skip to content

Commit ad0e119

Browse files
authored
Simplify Target.isReleaseBuild, with otherwise the same output. (#4709)
Note that in `getProperties()` there is a pre-step that already converts the string `"true"` to the boolean `true`, which is confusing, but go figure.
1 parent e57b369 commit ad0e119

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

app_dart/lib/src/model/ci_yaml/target.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,9 @@ final class Target {
309309
return null;
310310
}
311311

312-
/// Whether this target was marked with `release_build: true` in `.ci.yaml`.
312+
/// Whether this target was marked with `properties: release_build: "true"`.
313313
bool get isReleaseBuild {
314-
final properties = getProperties();
315-
return properties.containsKey('release_build') &&
316-
(properties['release_build'] as bool);
314+
return getProperties()['release_build'] == true;
317315
}
318316

319317
/// Whether this target was marked with `bringup: true` in `.ci.yaml`.

0 commit comments

Comments
 (0)