feat: add Linux as a supported release platform (#2810)

This commit is contained in:
Bryan Oltman
2025-01-27 18:04:21 -05:00
committed by GitHub
parent d926feb0a8
commit c82f987141
15 changed files with 61 additions and 37 deletions
@@ -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,
@@ -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,
@@ -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,
@@ -57,7 +57,8 @@ Map<String, dynamic> _$CreatePatchMetadataToJson(
const _$ReleasePlatformEnumMap = {
ReleasePlatform.android: 'android',
ReleasePlatform.macos: 'macos',
ReleasePlatform.ios: 'ios',
ReleasePlatform.linux: 'linux',
ReleasePlatform.macos: 'macos',
ReleasePlatform.windows: 'windows',
};
@@ -45,7 +45,8 @@ Map<String, dynamic> _$UpdateReleaseMetadataToJson(
const _$ReleasePlatformEnumMap = {
ReleasePlatform.android: 'android',
ReleasePlatform.macos: 'macos',
ReleasePlatform.ios: 'ios',
ReleasePlatform.linux: 'linux',
ReleasePlatform.macos: 'macos',
ReleasePlatform.windows: 'windows',
};
@@ -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;
}
@@ -46,7 +46,8 @@ Map<String, dynamic> _$CreatePatchArtifactRequestToJson(
const _$ReleasePlatformEnumMap = {
ReleasePlatform.android: 'android',
ReleasePlatform.macos: 'macos',
ReleasePlatform.ios: 'ios',
ReleasePlatform.linux: 'linux',
ReleasePlatform.macos: 'macos',
ReleasePlatform.windows: 'windows',
};
@@ -43,7 +43,8 @@ Map<String, dynamic> _$CreatePatchArtifactResponseToJson(
const _$ReleasePlatformEnumMap = {
ReleasePlatform.android: 'android',
ReleasePlatform.macos: 'macos',
ReleasePlatform.ios: 'ios',
ReleasePlatform.linux: 'linux',
ReleasePlatform.macos: 'macos',
ReleasePlatform.windows: 'windows',
};
@@ -51,7 +51,8 @@ Map<String, dynamic> _$CreateReleaseArtifactRequestToJson(
const _$ReleasePlatformEnumMap = {
ReleasePlatform.android: 'android',
ReleasePlatform.macos: 'macos',
ReleasePlatform.ios: 'ios',
ReleasePlatform.linux: 'linux',
ReleasePlatform.macos: 'macos',
ReleasePlatform.windows: 'windows',
};
@@ -43,7 +43,8 @@ Map<String, dynamic> _$CreateReleaseArtifactResponseToJson(
const _$ReleasePlatformEnumMap = {
ReleasePlatform.android: 'android',
ReleasePlatform.macos: 'macos',
ReleasePlatform.ios: 'ios',
ReleasePlatform.linux: 'linux',
ReleasePlatform.macos: 'macos',
ReleasePlatform.windows: 'windows',
};
@@ -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',
};
@@ -42,7 +42,8 @@ Map<String, dynamic> _$PatchArtifactToJson(PatchArtifact instance) =>
const _$ReleasePlatformEnumMap = {
ReleasePlatform.android: 'android',
ReleasePlatform.macos: 'macos',
ReleasePlatform.ios: 'ios',
ReleasePlatform.linux: 'linux',
ReleasePlatform.macos: 'macos',
ReleasePlatform.windows: 'windows',
};
@@ -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',
};
@@ -50,7 +50,8 @@ Map<String, dynamic> _$ReleaseArtifactToJson(ReleaseArtifact instance) =>
const _$ReleasePlatformEnumMap = {
ReleasePlatform.android: 'android',
ReleasePlatform.macos: 'macos',
ReleasePlatform.ios: 'ios',
ReleasePlatform.linux: 'linux',
ReleasePlatform.macos: 'macos',
ReleasePlatform.windows: 'windows',
};
@@ -3,12 +3,15 @@ enum ReleasePlatform {
/// Android
android('Android'),
/// macOS
macos('macOS'),
/// iOS
ios('iOS'),
/// Linux
linux('Linux'),
/// macOS
macos('macOS'),
/// Windows
windows('Windows');