Skip to content

Commit

Permalink
hotfix: try to fix maestro bootstrap on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Jun 6, 2022
1 parent 3078b06 commit 1d6adaf
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
2 changes: 1 addition & 1 deletion AutomatorServer/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ android {
minSdkVersion 26
targetSdkVersion 32
versionCode 1
versionName "0.0.5"
versionName "0.0.6"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
5 changes: 4 additions & 1 deletion packages/maestro_cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
## 0.0.6

- Fix `maestro bootstrap` on Windows crashing with ProcessException

## 0.0.5

- Make versions match AutomatorServer


## 0.0.4

- Nothing
Expand Down
35 changes: 18 additions & 17 deletions packages/maestro_cli/lib/src/commands/bootstrap_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,24 @@ Future<void> _createConfigFile() async {
progress.complete('Created default $configFileName');
}

Future<void> _addMaestroToPubspec() async {
final progress = log.progress('Adding $maestroPackage to dev_dependencies');

final result = await Process.run(
'flutter',
['pub', 'add', maestroPackage, '--dev'],
runInShell: true,
);

if (result.exitCode != 0) {
progress.fail('Failed to add $maestroPackage to dev_dependencies');
log.severe(result.stderr);
return;
}

progress.complete('Added $maestroPackage to dev_dependencies');
}

Future<void> _createDefaultTestDriverFile() async {
final relativeFilePath = path.join(driverDirName, driverFileName);

Expand Down Expand Up @@ -101,20 +119,3 @@ Future<void> _createDefaultIntegrationTestFile() async {

progress.complete('Created default $relativeFilePath');
}

Future<void> _addMaestroToPubspec() async {
final progress = log.progress('Adding $maestroPackage to dev_dependencies');

final result = await Process.run(
'flutter',
['pub', 'add', maestroPackage, '--dev'],
);

if (result.exitCode != 0) {
progress.fail('Failed to add $maestroPackage to dev_dependencies');
log.severe(result.stderr);
return;
}

progress.complete('Added $maestroPackage to dev_dependencies');
}
2 changes: 1 addition & 1 deletion packages/maestro_cli/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: maestro_cli
description: CLI for Maestro.
version: 0.0.5
version: 0.0.6
homepage: https://github.com/leancodepl/maestro

environment:
Expand Down

0 comments on commit 1d6adaf

Please sign in to comment.