fix(shorebird_cli): productFlavor casing (#502)

This commit is contained in:
Felix Angelov
2023-05-17 11:03:35 -05:00
committed by GitHub
parent 20ea6b3abc
commit a17c4ad478
3 changed files with 1063 additions and 1045 deletions
@@ -33,9 +33,9 @@ mixin ShorebirdFlavorMixin on ShorebirdJavaMixin {
for (final task in '${result.stdout}'.split('\n')) {
final match = assembleTaskPattern.matchAsPrefix(task);
if (match != null) {
final variant = match.group(1)!.toLowerCase();
if (!variant.endsWith('test')) {
variants.add(variant);
final variant = match.group(1)!;
if (!variant.toLowerCase().endsWith('test')) {
variants.add(variant[0].toLowerCase() + variant.substring(1));
}
}
}
File diff suppressed because it is too large Load Diff
@@ -361,7 +361,14 @@ If you want to reinitialize Shorebird, please run "shorebird init --force".''',
});
test('creates shorebird.yaml for an app with flavors', () async {
final appIds = ['test-appId-1', 'test-appId-2', 'test-appId-3'];
final appIds = [
'test-appId-1',
'test-appId-2',
'test-appId-3',
'test-appId-4',
'test-appId-5',
'test-appId-6'
];
var index = 0;
when(
() => codePushClient.createApp(displayName: any(named: 'displayName')),
@@ -388,8 +395,11 @@ If you want to reinitialize Shorebird, please run "shorebird init --force".''',
app_id: ${appIds[0]}
flavors:
development: ${appIds[0]}
production: ${appIds[1]}
staging: ${appIds[2]}'''),
developmentInternal: ${appIds[1]}
production: ${appIds[2]}
productionInternal: ${appIds[3]}
staging: ${appIds[4]}
stagingInternal: ${appIds[5]}'''),
);
verifyInOrder([