Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(shorebird_cli): adjust engine file permissions #36

Merged
merged 5 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/dart_package/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ runs:

- working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: dart analyze --fatal-infos --fatal-warnings ${{inputs.analyze_directories}}
run: dart analyze --fatal-warnings ${{inputs.analyze_directories}}
Copy link
Contributor Author

@felangel felangel Mar 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adjusting this to allow us to include TODOs for now


- working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
Expand Down
21 changes: 21 additions & 0 deletions packages/shorebird_cli/lib/src/commands/run_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class RunCommand extends Command<int> {
await _extractShorebirdEngine(
shorebirdEngineCache.path,
shorebirdEngine.path,
_startProcess,
);
buildingEngine.complete();
} catch (error) {
Expand Down Expand Up @@ -150,6 +151,7 @@ Future<void> _downloadShorebirdEngine(
Future<void> _extractShorebirdEngine(
String archivePath,
String targetPath,
StartProcess startProcess,
) async {
final targetDirectory = Directory(targetPath);

Expand All @@ -164,4 +166,23 @@ Future<void> _extractShorebirdEngine(
extractArchiveToDisk(archive, targetPath);
},
);

const executables = [
'flutter/prebuilts/macos-x64/dart-sdk/bin/dart',
felangel marked this conversation as resolved.
Show resolved Hide resolved
'flutter/prebuilts/macos-x64/dart-sdk/bin/dartaotruntime',
'out/android_release_arm64/clang_x64/gen_snapshot',
'out/android_release_arm64/clang_x64/gen_snapshot_arm64',
'out/android_release_arm64/clang_x64/impellerc',
];

// TODO(felangel): verify whether additional steps are necessary on Windows.
if (Platform.isMacOS || Platform.isLinux) {
for (final executable in executables) {
final process = await startProcess(
'chmod',
['+x', p.join(targetPath, executable)],
);
await process.exitCode;
}
}
}