mirror of
https://github.com/reactivecircus/android-emulator-runner.git
synced 2026-08-31 17:49:33 +00:00
Add missing compiled js files.
This commit is contained in:
@@ -31,7 +31,7 @@ function launchEmulator(apiLevel, target, arch, profile, headless, disableAnimat
|
||||
}
|
||||
else {
|
||||
console.log(`Creating AVD without custom profile.`);
|
||||
yield exec.exec(`echo "no" | ${AVD_MANAGER_PATH} create avd --force -n test --abi "${target}/${arch}" --package "system-images;android-${apiLevel};${target};${arch}"`);
|
||||
yield exec.exec(`bash -c \\"echo no | ${AVD_MANAGER_PATH} create avd --force -n test --abi '${target}/${arch}' --package 'system-images;android-${apiLevel};${target};${arch}'`);
|
||||
}
|
||||
// start emulator
|
||||
console.log('Starting emulator.');
|
||||
|
||||
+5
-2
@@ -54,13 +54,16 @@ function run() {
|
||||
const disableAnimations = disableAnimationsInput === 'true';
|
||||
console.log(`disable animations: ${disableAnimations}`);
|
||||
// custom scrpt to run
|
||||
const script = core.getInput('script', { required: true });
|
||||
const scriptInput = core.getInput('script', { required: true });
|
||||
const commands = scriptInput.split(/\r?\n/);
|
||||
// install SDK
|
||||
yield sdk_installer_1.installAndroidSdk(apiLevel, target, arch);
|
||||
// launch an emulator
|
||||
yield emulator_manager_1.launchEmulator(apiLevel, target, arch, profile, headless, disableAnimations);
|
||||
// execute the custom script
|
||||
yield exec.exec(`${script}`);
|
||||
commands.forEach((command) => __awaiter(this, void 0, void 0, function* () {
|
||||
yield exec.exec(`${command}`);
|
||||
}));
|
||||
// finally kill the emulator
|
||||
yield emulator_manager_1.killEmulator();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user