chore: add windows to ReleasePlatform enum (#2681)

This commit is contained in:
Bryan Oltman
2024-12-13 17:09:15 -05:00
committed by GitHub
parent 616ff13ad3
commit 1b7bd7e14a
13 changed files with 32 additions and 1 deletions
@@ -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';
@@ -48,4 +48,5 @@ const _$ReleasePlatformEnumMap = {
ReleasePlatform.android: 'android',
ReleasePlatform.macos: 'macos',
ReleasePlatform.ios: 'ios',
ReleasePlatform.windows: 'windows',
};
@@ -45,4 +45,5 @@ const _$ReleasePlatformEnumMap = {
ReleasePlatform.android: 'android',
ReleasePlatform.macos: 'macos',
ReleasePlatform.ios: 'ios',
ReleasePlatform.windows: 'windows',
};
@@ -53,4 +53,5 @@ const _$ReleasePlatformEnumMap = {
ReleasePlatform.android: 'android',
ReleasePlatform.macos: 'macos',
ReleasePlatform.ios: 'ios',
ReleasePlatform.windows: 'windows',
};
@@ -45,4 +45,5 @@ const _$ReleasePlatformEnumMap = {
ReleasePlatform.android: 'android',
ReleasePlatform.macos: 'macos',
ReleasePlatform.ios: 'ios',
ReleasePlatform.windows: 'windows',
};
@@ -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);