From d305d2b7351c7f1e7749e169addbbfeef97a58fc Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Mon, 6 May 2024 23:07:39 +0600 Subject: [PATCH] cd: use dpkg zstd instead of xz, windows disable innoInstall, fix channel enum.name and reset pubspec after changing build no for nightly --- cli/commands/build/android.dart | 10 +++++----- cli/commands/build/common.dart | 7 +++++-- cli/commands/build/ios.dart | 4 ++-- cli/commands/build/linux.dart | 1 - cli/commands/build/windows.dart | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/cli/commands/build/android.dart b/cli/commands/build/android.dart index b6c7e9d6..e41761be 100644 --- a/cli/commands/build/android.dart +++ b/cli/commands/build/android.dart @@ -21,7 +21,7 @@ class AndroidBuildCommand extends Command with BuildCommandCommonSteps { await bootstrap(); await shell.run( - "flutter build apk --flavor ${CliEnv.channel}", + "flutter build apk --flavor ${CliEnv.channel.name}", ); await dotEnvFile.writeAsString( @@ -51,7 +51,7 @@ class AndroidBuildCommand extends Command with BuildCommandCommonSteps { await shell.run( """ dart run build_runner build --delete-conflicting-outputs - flutter build appbundle --flavor ${CliEnv.channel} + flutter build appbundle --flavor ${CliEnv.channel.name} """, ); @@ -61,7 +61,7 @@ class AndroidBuildCommand extends Command with BuildCommandCommonSteps { "app", "outputs", "flutter-apk", - "app-${CliEnv.channel}-release.apk", + "app-${CliEnv.channel.name}-release.apk", ), ); @@ -76,8 +76,8 @@ class AndroidBuildCommand extends Command with BuildCommandCommonSteps { "app", "outputs", "bundle", - "${CliEnv.channel}Release", - "app-${CliEnv.channel}-release.aab", + "${CliEnv.channel.name}Release", + "app-${CliEnv.channel.name}-release.aab", ), ); diff --git a/cli/commands/build/common.dart b/cli/commands/build/common.dart index 8484b5dd..4c7e3e51 100644 --- a/cli/commands/build/common.dart +++ b/cli/commands/build/common.dart @@ -38,7 +38,7 @@ mixin BuildCommandCommonSteps on Command { await dotEnvFile.writeAsString( "${CliEnv.dotenv}\n" - "RELEASE_CHANNEL=${CliEnv.channel}\n", + "RELEASE_CHANNEL=${CliEnv.channel.name}\n", ); if (CliEnv.channel == BuildChannel.nightly) { @@ -47,9 +47,12 @@ mixin BuildCommandCommonSteps on Command { pubspecFile.writeAsStringSync( pubspecFile.readAsStringSync().replaceAll( "version: ${pubspec.version!.canonicalizedVersion}", - "version: $versionWithoutBuildNumber+${CliEnv.ghRunNumber}" + "version: $versionWithoutBuildNumber+${CliEnv.ghRunNumber}", ), ); + + _pubspec = null; + pubspec; } await shell.run( diff --git a/cli/commands/build/ios.dart b/cli/commands/build/ios.dart index dfb7ce51..6460f9ed 100644 --- a/cli/commands/build/ios.dart +++ b/cli/commands/build/ios.dart @@ -20,9 +20,9 @@ class IosBuildCommand extends Command with BuildCommandCommonSteps { final buildDirPath = join(cwd.path, "build", "ios", "iphoneos"); await shell.run( """ - flutter build ios --release --no-codesign --flavor ${CliEnv.channel} + flutter build ios --release --no-codesign --flavor ${CliEnv.channel.name} ln -sf $buildDirPath Payload - zip -r9 Spotube-iOS.ipa ${join("Payload", "${CliEnv.channel}.app")} + zip -r9 Spotube-iOS.ipa ${join("Payload", "${CliEnv.channel.name}.app")} """, ); } diff --git a/cli/commands/build/linux.dart b/cli/commands/build/linux.dart index 3cca62da..ffe15728 100644 --- a/cli/commands/build/linux.dart +++ b/cli/commands/build/linux.dart @@ -37,7 +37,6 @@ class LinuxBuildCommand extends Command with BuildCommandCommonSteps { await shell.run( """ - alias dpkg-deb="dpkg-deb --Zxz" flutter_distributor package --platform=linux --targets=deb flutter_distributor package --platform=linux --targets=rpm """, diff --git a/cli/commands/build/windows.dart b/cli/commands/build/windows.dart index e41cfcda..e675ff26 100644 --- a/cli/commands/build/windows.dart +++ b/cli/commands/build/windows.dart @@ -45,7 +45,7 @@ class WindowsBuildCommand extends Command with BuildCommandCommonSteps { } await bootstrap(); - await innoInstall(); + // await innoInstall(); await shell.run( "flutter_distributor package --platform=windows --targets=exe --skip-clean",