Skip to content

Commit

Permalink
refactor(shorebird_cli): update shorebird_linker to aot-tools (#1470
Browse files Browse the repository at this point in the history
)
  • Loading branch information
felangel authored Nov 9, 2023
1 parent c7b812c commit 2a478ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions packages/shorebird_cli/lib/src/cache.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions packages/shorebird_cli/test/src/cache_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
});
Expand Down

0 comments on commit 2a478ff

Please sign in to comment.