Fix side effects of this action

This commit is contained in:
Shivam Mathur
2019-10-29 05:37:39 +05:30
parent 16267e1982
commit 0d8d5d2f2c
26 changed files with 162 additions and 180 deletions
+9 -9
View File
@@ -18,10 +18,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
const exec_1 = require("@actions/exec/lib/exec");
const core = __importStar(require("@actions/core"));
const utils = __importStar(require("./utils"));
const extensions = __importStar(require("./extensions"));
const config = __importStar(require("./config"));
const coverage = __importStar(require("./coverage"));
const extensions = __importStar(require("./extensions"));
const utils = __importStar(require("./utils"));
/**
* Build the script
*
@@ -45,7 +45,7 @@ function build(filename, version, os_version) {
if (coverage_driver) {
script += yield coverage.addCoverage(coverage_driver, version, os_version);
}
yield utils.writeScript(filename, version, script);
return yield utils.writeScript(filename, script);
});
}
/**
@@ -58,16 +58,16 @@ function run() {
let version = yield utils.getInput('php-version', true);
// check the os version and run the respective script
if (os_version == 'darwin') {
yield build('darwin.sh', version, os_version);
yield exec_1.exec('sh ./' + version + 'darwin.sh ' + version);
let script_path = yield build('darwin.sh', version, os_version);
yield exec_1.exec('sh ' + script_path + ' ' + version + ' ' + __dirname);
}
else if (os_version == 'win32') {
yield build('win32.ps1', version, os_version);
yield exec_1.exec('pwsh .\\' + version + 'win32.ps1 -version ' + version);
let script_path = yield build('win32.ps1', version, os_version);
yield exec_1.exec('pwsh ' + script_path + ' -version ' + version + ' -dir ' + __dirname);
}
else if (os_version == 'linux') {
yield build('linux.sh', version, os_version);
yield exec_1.exec('./' + version + 'linux.sh ' + version);
let script_path = yield build('linux.sh', version, os_version);
yield exec_1.exec('sh ' + script_path + ' ' + version + ' ' + __dirname);
}
}
catch (error) {