chore: add windows to ReleasePlatform enum (#2681)
This commit is contained in:
@@ -244,6 +244,7 @@ class PreviewCommand extends ShorebirdCommand {
|
||||
deviceId: deviceId,
|
||||
track: track,
|
||||
),
|
||||
ReleasePlatform.windows => throw UnimplementedError(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -59,4 +59,5 @@ const _$ReleasePlatformEnumMap = {
|
||||
ReleasePlatform.android: 'android',
|
||||
ReleasePlatform.macos: 'macos',
|
||||
ReleasePlatform.ios: 'ios',
|
||||
ReleasePlatform.windows: 'windows',
|
||||
};
|
||||
|
||||
@@ -47,4 +47,5 @@ const _$ReleasePlatformEnumMap = {
|
||||
ReleasePlatform.android: 'android',
|
||||
ReleasePlatform.macos: 'macos',
|
||||
ReleasePlatform.ios: 'ios',
|
||||
ReleasePlatform.windows: 'windows',
|
||||
};
|
||||
|
||||
@@ -325,6 +325,24 @@ void main() {
|
||||
});
|
||||
});
|
||||
|
||||
group('when releasePlatform is not supported', () {
|
||||
setUp(() {
|
||||
when(() => release.platformStatuses).thenReturn({
|
||||
ReleasePlatform.windows: ReleaseStatus.active,
|
||||
});
|
||||
when(
|
||||
() => argResults['platform'],
|
||||
).thenReturn(ReleasePlatform.windows.name);
|
||||
});
|
||||
|
||||
test('throws an UnimplementedError', () async {
|
||||
await expectLater(
|
||||
() => runWithOverrides(command.run),
|
||||
throwsA(isA<UnimplementedError>()),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
group('android', () {
|
||||
const releasePlatform = ReleasePlatform.android;
|
||||
const releaseArtifactUrl = 'https://example.com/release.aab';
|
||||
|
||||
+1
@@ -48,4 +48,5 @@ const _$ReleasePlatformEnumMap = {
|
||||
ReleasePlatform.android: 'android',
|
||||
ReleasePlatform.macos: 'macos',
|
||||
ReleasePlatform.ios: 'ios',
|
||||
ReleasePlatform.windows: 'windows',
|
||||
};
|
||||
|
||||
+1
@@ -45,4 +45,5 @@ const _$ReleasePlatformEnumMap = {
|
||||
ReleasePlatform.android: 'android',
|
||||
ReleasePlatform.macos: 'macos',
|
||||
ReleasePlatform.ios: 'ios',
|
||||
ReleasePlatform.windows: 'windows',
|
||||
};
|
||||
|
||||
+1
@@ -53,4 +53,5 @@ const _$ReleasePlatformEnumMap = {
|
||||
ReleasePlatform.android: 'android',
|
||||
ReleasePlatform.macos: 'macos',
|
||||
ReleasePlatform.ios: 'ios',
|
||||
ReleasePlatform.windows: 'windows',
|
||||
};
|
||||
|
||||
+1
@@ -45,4 +45,5 @@ const _$ReleasePlatformEnumMap = {
|
||||
ReleasePlatform.android: 'android',
|
||||
ReleasePlatform.macos: 'macos',
|
||||
ReleasePlatform.ios: 'ios',
|
||||
ReleasePlatform.windows: 'windows',
|
||||
};
|
||||
|
||||
+1
@@ -43,4 +43,5 @@ const _$ReleasePlatformEnumMap = {
|
||||
ReleasePlatform.android: 'android',
|
||||
ReleasePlatform.macos: 'macos',
|
||||
ReleasePlatform.ios: 'ios',
|
||||
ReleasePlatform.windows: 'windows',
|
||||
};
|
||||
|
||||
@@ -44,4 +44,5 @@ const _$ReleasePlatformEnumMap = {
|
||||
ReleasePlatform.android: 'android',
|
||||
ReleasePlatform.macos: 'macos',
|
||||
ReleasePlatform.ios: 'ios',
|
||||
ReleasePlatform.windows: 'windows',
|
||||
};
|
||||
|
||||
@@ -67,4 +67,5 @@ const _$ReleasePlatformEnumMap = {
|
||||
ReleasePlatform.android: 'android',
|
||||
ReleasePlatform.macos: 'macos',
|
||||
ReleasePlatform.ios: 'ios',
|
||||
ReleasePlatform.windows: 'windows',
|
||||
};
|
||||
|
||||
@@ -52,4 +52,5 @@ const _$ReleasePlatformEnumMap = {
|
||||
ReleasePlatform.android: 'android',
|
||||
ReleasePlatform.macos: 'macos',
|
||||
ReleasePlatform.ios: 'ios',
|
||||
ReleasePlatform.windows: 'windows',
|
||||
};
|
||||
|
||||
@@ -5,7 +5,9 @@ enum ReleasePlatform {
|
||||
// ignore: public_member_api_docs
|
||||
macos('macOS'),
|
||||
// ignore: public_member_api_docs
|
||||
ios('iOS');
|
||||
ios('iOS'),
|
||||
// ignore: public_member_api_docs
|
||||
windows('Windows');
|
||||
|
||||
const ReleasePlatform(this.displayName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user