fix(shorebird_cli): productFlavor casing (#502)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1047
-1039
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([
|
||||
|
||||
Reference in New Issue
Block a user