refactor(shorebird_cli): update shorebird_linker to aot-tools (#1470)
This commit is contained in:
@@ -54,7 +54,7 @@ class Cache {
|
||||
}) : httpClient = httpClient ?? retryingHttpClient(http.Client()) {
|
||||
registerArtifact(PatchArtifact(cache: this, platform: platform));
|
||||
registerArtifact(BundleToolArtifact(cache: this, platform: platform));
|
||||
registerArtifact(ShorebirdLinkerArtifact(cache: this, platform: platform));
|
||||
registerArtifact(AotToolsArtifact(cache: this, platform: platform));
|
||||
}
|
||||
|
||||
final http.Client httpClient;
|
||||
@@ -187,22 +187,22 @@ allowed to access $storageUrl.''',
|
||||
}
|
||||
}
|
||||
|
||||
class ShorebirdLinkerArtifact extends CachedArtifact {
|
||||
ShorebirdLinkerArtifact({required super.cache, required super.platform});
|
||||
class AotToolsArtifact extends CachedArtifact {
|
||||
AotToolsArtifact({required super.cache, required super.platform});
|
||||
|
||||
@override
|
||||
String get name => 'shorebird_linker';
|
||||
String get name => 'aot-tools';
|
||||
|
||||
@override
|
||||
List<String> get executables => ['shorebird_linker'];
|
||||
List<String> get executables => ['aot-tools'];
|
||||
|
||||
/// The linker is only available for revisions that support mixed-mode.
|
||||
/// The aot-tools are only available for revisions that support mixed-mode.
|
||||
@override
|
||||
bool get required => false;
|
||||
|
||||
@override
|
||||
String get storageUrl {
|
||||
var artifactName = 'linker-';
|
||||
var artifactName = 'aot-tools-';
|
||||
if (platform.isMacOS) {
|
||||
artifactName += 'darwin-x64';
|
||||
} else if (platform.isLinux) {
|
||||
|
||||
@@ -215,7 +215,7 @@ void main() {
|
||||
(invocation) async {
|
||||
final request =
|
||||
invocation.positionalArguments.first as http.BaseRequest;
|
||||
if (request.url.path.endsWith('linker-darwin-x64')) {
|
||||
if (request.url.path.endsWith('aot-tools-darwin-x64')) {
|
||||
return http.StreamedResponse(
|
||||
const Stream.empty(),
|
||||
HttpStatus.notFound,
|
||||
@@ -234,7 +234,7 @@ void main() {
|
||||
);
|
||||
verify(
|
||||
() => logger.detail(
|
||||
'''[cache] optional artifact: "shorebird_linker" was not found, skipping...''',
|
||||
'''[cache] optional artifact: "aot-tools" was not found, skipping...''',
|
||||
),
|
||||
).called(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user