cd: use dpkg zstd instead of xz, windows disable innoInstall, fix channel enum.name and reset pubspec after changing build no for nightly

This commit is contained in:
Kingkor Roy Tirtho 2024-05-06 23:07:39 +06:00
parent b217663656
commit d305d2b735
5 changed files with 13 additions and 11 deletions

View File

@ -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",
),
);

View File

@ -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(

View File

@ -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")}
""",
);
}

View File

@ -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
""",

View File

@ -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",