diff --git a/packages/shorebird_cli/lib/src/commands/patch/patch_command.dart b/packages/shorebird_cli/lib/src/commands/patch/patch_command.dart index 0142afef..1977d115 100644 --- a/packages/shorebird_cli/lib/src/commands/patch/patch_command.dart +++ b/packages/shorebird_cli/lib/src/commands/patch/patch_command.dart @@ -228,6 +228,13 @@ NOTE: this is ${styleBold.wrap('not')} recommended. Asset changes cannot be incl @visibleForTesting Patcher getPatcher(ReleaseType releaseType) { switch (releaseType) { + case ReleaseType.aar: + return AarPatcher( + argResults: results, + argParser: argParser, + flavor: flavor, + target: target, + ); case ReleaseType.android: return AndroidPatcher( argResults: results, @@ -249,6 +256,8 @@ NOTE: this is ${styleBold.wrap('not')} recommended. Asset changes cannot be incl flavor: flavor, target: target, ); + case ReleaseType.linux: + throw UnimplementedError(); case ReleaseType.macos: return MacosPatcher( argParser: argParser, @@ -256,13 +265,6 @@ NOTE: this is ${styleBold.wrap('not')} recommended. Asset changes cannot be incl flavor: flavor, target: target, ); - case ReleaseType.aar: - return AarPatcher( - argResults: results, - argParser: argParser, - flavor: flavor, - target: target, - ); case ReleaseType.windows: return WindowsPatcher( argResults: results, diff --git a/packages/shorebird_cli/lib/src/commands/preview_command.dart b/packages/shorebird_cli/lib/src/commands/preview_command.dart index 25e41e1b..95bd18df 100644 --- a/packages/shorebird_cli/lib/src/commands/preview_command.dart +++ b/packages/shorebird_cli/lib/src/commands/preview_command.dart @@ -285,17 +285,18 @@ This is only applicable when previewing Android releases.''', deviceId: deviceId, track: track, ), - ReleasePlatform.macos => installAndLaunchMacos( - appId: appId, - release: release, - track: track, - ), ReleasePlatform.ios => installAndLaunchIos( appId: appId, release: release, deviceId: deviceId, track: track, ), + ReleasePlatform.linux => throw UnimplementedError(), + ReleasePlatform.macos => installAndLaunchMacos( + appId: appId, + release: release, + track: track, + ), ReleasePlatform.windows => installAndLaunchWindows( appId: appId, release: release, diff --git a/packages/shorebird_cli/lib/src/commands/release/release_command.dart b/packages/shorebird_cli/lib/src/commands/release/release_command.dart index 4ec3245f..fda779cc 100644 --- a/packages/shorebird_cli/lib/src/commands/release/release_command.dart +++ b/packages/shorebird_cli/lib/src/commands/release/release_command.dart @@ -183,6 +183,12 @@ of the iOS app that is using this module. (aar and ios-framework only)''', @visibleForTesting Releaser getReleaser(ReleaseType releaseType) { switch (releaseType) { + case ReleaseType.aar: + return AarReleaser( + argResults: results, + flavor: flavor, + target: target, + ); case ReleaseType.android: return AndroidReleaser( argResults: results, @@ -195,20 +201,16 @@ of the iOS app that is using this module. (aar and ios-framework only)''', flavor: flavor, target: target, ); - case ReleaseType.macos: - return MacosReleaser( - argResults: results, - flavor: flavor, - target: target, - ); case ReleaseType.iosFramework: return IosFrameworkReleaser( argResults: results, flavor: flavor, target: target, ); - case ReleaseType.aar: - return AarReleaser( + case ReleaseType.linux: + throw UnimplementedError(); + case ReleaseType.macos: + return MacosReleaser( argResults: results, flavor: flavor, target: target, diff --git a/packages/shorebird_cli/lib/src/metadata/create_patch_metadata.g.dart b/packages/shorebird_cli/lib/src/metadata/create_patch_metadata.g.dart index 5462a2c0..8d4caa45 100644 --- a/packages/shorebird_cli/lib/src/metadata/create_patch_metadata.g.dart +++ b/packages/shorebird_cli/lib/src/metadata/create_patch_metadata.g.dart @@ -57,7 +57,8 @@ Map _$CreatePatchMetadataToJson( const _$ReleasePlatformEnumMap = { ReleasePlatform.android: 'android', - ReleasePlatform.macos: 'macos', ReleasePlatform.ios: 'ios', + ReleasePlatform.linux: 'linux', + ReleasePlatform.macos: 'macos', ReleasePlatform.windows: 'windows', }; diff --git a/packages/shorebird_cli/lib/src/metadata/update_release_metadata.g.dart b/packages/shorebird_cli/lib/src/metadata/update_release_metadata.g.dart index c54df8eb..6ea1015a 100644 --- a/packages/shorebird_cli/lib/src/metadata/update_release_metadata.g.dart +++ b/packages/shorebird_cli/lib/src/metadata/update_release_metadata.g.dart @@ -45,7 +45,8 @@ Map _$UpdateReleaseMetadataToJson( const _$ReleasePlatformEnumMap = { ReleasePlatform.android: 'android', - ReleasePlatform.macos: 'macos', ReleasePlatform.ios: 'ios', + ReleasePlatform.linux: 'linux', + ReleasePlatform.macos: 'macos', ReleasePlatform.windows: 'windows', }; diff --git a/packages/shorebird_cli/lib/src/release_type.dart b/packages/shorebird_cli/lib/src/release_type.dart index 60d616b5..c15fcccb 100644 --- a/packages/shorebird_cli/lib/src/release_type.dart +++ b/packages/shorebird_cli/lib/src/release_type.dart @@ -13,6 +13,8 @@ enum ReleaseType { /// A full Flutter iOS app. ios, + linux, + /// A full Flutter macOS app. macos, @@ -25,16 +27,18 @@ enum ReleaseType { /// The CLI argument used to specify the release type(s). String get cliName { switch (this) { + case ReleaseType.aar: + return 'aar'; case ReleaseType.android: return 'android'; case ReleaseType.ios: return 'ios'; case ReleaseType.iosFramework: return 'ios-framework'; + case ReleaseType.linux: + return 'linux'; case ReleaseType.macos: return 'macos'; - case ReleaseType.aar: - return 'aar'; case ReleaseType.windows: return 'windows'; } @@ -49,10 +53,12 @@ enum ReleaseType { return ReleasePlatform.android; case ReleaseType.ios: return ReleasePlatform.ios; - case ReleaseType.macos: - return ReleasePlatform.macos; case ReleaseType.iosFramework: return ReleasePlatform.ios; + case ReleaseType.linux: + return ReleasePlatform.linux; + case ReleaseType.macos: + return ReleasePlatform.macos; case ReleaseType.windows: return ReleasePlatform.windows; } diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_request.g.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_request.g.dart index b33a9910..917a92cb 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_request.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_request.g.dart @@ -46,7 +46,8 @@ Map _$CreatePatchArtifactRequestToJson( const _$ReleasePlatformEnumMap = { ReleasePlatform.android: 'android', - ReleasePlatform.macos: 'macos', ReleasePlatform.ios: 'ios', + ReleasePlatform.linux: 'linux', + ReleasePlatform.macos: 'macos', ReleasePlatform.windows: 'windows', }; diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.g.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.g.dart index b9234710..6fcb0f46 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.g.dart @@ -43,7 +43,8 @@ Map _$CreatePatchArtifactResponseToJson( const _$ReleasePlatformEnumMap = { ReleasePlatform.android: 'android', - ReleasePlatform.macos: 'macos', ReleasePlatform.ios: 'ios', + ReleasePlatform.linux: 'linux', + ReleasePlatform.macos: 'macos', ReleasePlatform.windows: 'windows', }; diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_request.g.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_request.g.dart index d1bac57b..dd621b94 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_request.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_request.g.dart @@ -51,7 +51,8 @@ Map _$CreateReleaseArtifactRequestToJson( const _$ReleasePlatformEnumMap = { ReleasePlatform.android: 'android', - ReleasePlatform.macos: 'macos', ReleasePlatform.ios: 'ios', + ReleasePlatform.linux: 'linux', + ReleasePlatform.macos: 'macos', ReleasePlatform.windows: 'windows', }; diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.g.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.g.dart index 6ffebe4c..4362454a 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.g.dart @@ -43,7 +43,8 @@ Map _$CreateReleaseArtifactResponseToJson( const _$ReleasePlatformEnumMap = { ReleasePlatform.android: 'android', - ReleasePlatform.macos: 'macos', ReleasePlatform.ios: 'ios', + ReleasePlatform.linux: 'linux', + ReleasePlatform.macos: 'macos', ReleasePlatform.windows: 'windows', }; diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/update_release/update_release_request.g.dart b/packages/shorebird_code_push_protocol/lib/src/messages/update_release/update_release_request.g.dart index 6feed5e3..d3d4dc3d 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/update_release/update_release_request.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/update_release/update_release_request.g.dart @@ -41,7 +41,8 @@ const _$ReleaseStatusEnumMap = { const _$ReleasePlatformEnumMap = { ReleasePlatform.android: 'android', - ReleasePlatform.macos: 'macos', ReleasePlatform.ios: 'ios', + ReleasePlatform.linux: 'linux', + ReleasePlatform.macos: 'macos', ReleasePlatform.windows: 'windows', }; diff --git a/packages/shorebird_code_push_protocol/lib/src/models/patch_artifact.g.dart b/packages/shorebird_code_push_protocol/lib/src/models/patch_artifact.g.dart index a8d30501..5bf568d4 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/patch_artifact.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/patch_artifact.g.dart @@ -42,7 +42,8 @@ Map _$PatchArtifactToJson(PatchArtifact instance) => const _$ReleasePlatformEnumMap = { ReleasePlatform.android: 'android', - ReleasePlatform.macos: 'macos', ReleasePlatform.ios: 'ios', + ReleasePlatform.linux: 'linux', + ReleasePlatform.macos: 'macos', ReleasePlatform.windows: 'windows', }; diff --git a/packages/shorebird_code_push_protocol/lib/src/models/release.g.dart b/packages/shorebird_code_push_protocol/lib/src/models/release.g.dart index 14cdf3ae..21678ee8 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/release.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/release.g.dart @@ -65,7 +65,8 @@ const _$ReleaseStatusEnumMap = { const _$ReleasePlatformEnumMap = { ReleasePlatform.android: 'android', - ReleasePlatform.macos: 'macos', ReleasePlatform.ios: 'ios', + ReleasePlatform.linux: 'linux', + ReleasePlatform.macos: 'macos', ReleasePlatform.windows: 'windows', }; diff --git a/packages/shorebird_code_push_protocol/lib/src/models/release_artifact.g.dart b/packages/shorebird_code_push_protocol/lib/src/models/release_artifact.g.dart index dfd938d7..8e8fcf77 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/release_artifact.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/release_artifact.g.dart @@ -50,7 +50,8 @@ Map _$ReleaseArtifactToJson(ReleaseArtifact instance) => const _$ReleasePlatformEnumMap = { ReleasePlatform.android: 'android', - ReleasePlatform.macos: 'macos', ReleasePlatform.ios: 'ios', + ReleasePlatform.linux: 'linux', + ReleasePlatform.macos: 'macos', ReleasePlatform.windows: 'windows', }; diff --git a/packages/shorebird_code_push_protocol/lib/src/models/release_platform.dart b/packages/shorebird_code_push_protocol/lib/src/models/release_platform.dart index 12451cbd..f011b7a5 100644 --- a/packages/shorebird_code_push_protocol/lib/src/models/release_platform.dart +++ b/packages/shorebird_code_push_protocol/lib/src/models/release_platform.dart @@ -3,12 +3,15 @@ enum ReleasePlatform { /// Android android('Android'), - /// macOS - macos('macOS'), - /// iOS ios('iOS'), + /// Linux + linux('Linux'), + + /// macOS + macos('macOS'), + /// Windows windows('Windows');