Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Map<String, dynamic> compileShorebirdYaml(YamlMap yamlMap, {required String? fla
}
copyIfSet('base_url');
copyIfSet('auto_update');
copyIfSet('patch_verification');
final String? shorebirdPublicKeyEnvVar = environment['SHOREBIRD_PUBLIC_KEY'];
if (shorebirdPublicKeyEnvVar != null) {
compiled['patch_public_key'] = shorebirdPublicKeyEnvVar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ flavors:
foo: 2-a
bar: 3-a
base_url: https://example.com
patch_verification: strict
''';
final YamlDocument input = loadYamlDocument(yamlContents);
final YamlMap yamlMap = input.contents as YamlMap;
Expand All @@ -61,13 +62,15 @@ base_url: https://example.com
'app_id': '1-a',
'auto_update': false,
'base_url': 'https://example.com',
'patch_verification': 'strict',
});
final Map<String, dynamic> compiled2 =
compileShorebirdYaml(yamlMap, flavor: 'foo', environment: <String, String>{'SHOREBIRD_PUBLIC_KEY': '4-a'});
expect(compiled2, <String, dynamic>{
'app_id': '2-a',
'auto_update': false,
'base_url': 'https://example.com',
'patch_verification': 'strict',
'patch_public_key': '4-a',
});
});
Expand Down