Skip to content

Commit f74442e

Browse files
committed
chore(distroless): Try to re-enable beta builds
Use prebuilt Dart SDK since the git revision of the /third_party version does not match the prebuilt which causes invalid SDK hash checks when testing against the downloaded Flutter SDK.
1 parent a9d183a commit f74442e

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

apps/distroless/bin/list_sdks.dart

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
import 'dart:convert';
22

33
import 'package:distroless/src/sdk/sdk_manager.dart';
4-
import 'package:distroless/src/sdk/sdk_release_info.dart';
54
import 'package:pub_semver/pub_semver.dart';
65

76
final Version minDartSdkVersion = Version(3, 7, 0);
87
final Version minFlutterSdkVersion = Version(3, 29, 0);
98

9+
/// SDKs where the tagged Dart SDK version does not match the published one.
10+
final List<Version> badFlutterSdks = [
11+
Version.parse('3.30.0-0.1.pre'),
12+
Version.parse('3.31.0-0.1.pre'),
13+
];
14+
1015
Future<void> main(List<String> args) async {
1116
final type = args.isNotEmpty ? args[0] : 'dart';
1217
final (sdkManager, minVersion) = switch (type) {
@@ -21,11 +26,13 @@ Future<void> main(List<String> args) async {
2126
allVersions.allReleases.entries.where((v) => v.key >= minVersion).toList()
2227
..sort((a, b) => a.key.compareTo(b.key)),
2328
);
29+
if (type == 'flutter') {
30+
for (final version in badFlutterSdks) {
31+
releases.remove(version);
32+
}
33+
}
2434
final versions =
2535
releases.entries
26-
// TODO(dnys1): Only include stable releases for Flutter since beta
27-
// SDKs create SDK hash mismatch errors.
28-
.where((it) => type == 'dart' || it.value == SdkChannel.stable)
2936
.map((it) => {'version': it.key.toString(), 'channel': it.value.name})
3037
.toList();
3138

apps/distroless/flutter/build/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ esac
2222
--no-rbe \
2323
--no-stripped \
2424
--verbose \
25-
--no-prebuilt-dart-sdk \
25+
--prebuilt-dart-sdk \
2626
--no-enable-unittests \
2727
--enable-fontconfig \
2828
--target-dir=host_release \

apps/distroless/flutter/build/sync.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ solutions = [
2828
"download_esbuild": False,
2929
"download_android_deps": False,
3030
"download_fuchsia_deps": False,
31+
"download_dart_sdk": True,
3132
"host_os": "linux",
3233
"host_cpu": "${ARCH}",
3334
}

0 commit comments

Comments
 (0)