Improve workflow and lint the code

This commit is contained in:
Shivam Mathur
2019-11-24 02:38:52 +05:30
parent 2b938d931a
commit 3f6c88dec7
18 changed files with 1531 additions and 474 deletions
+8 -7
View File
@@ -32,9 +32,9 @@ const utils = __importStar(require("./utils"));
function build(filename, version, os_version) {
return __awaiter(this, void 0, void 0, function* () {
// taking inputs
let extension_csv = yield utils.getInput('extension-csv', false);
let ini_values_csv = yield utils.getInput('ini-values-csv', false);
let coverage_driver = yield utils.getInput('coverage', false);
const extension_csv = yield utils.getInput('extension-csv', false);
const ini_values_csv = yield utils.getInput('ini-values-csv', false);
const coverage_driver = yield utils.getInput('coverage', false);
let script = yield utils.readScript(filename, version, os_version);
if (extension_csv) {
script += yield extensions.addExtension(extension_csv, version, os_version);
@@ -55,8 +55,8 @@ exports.build = build;
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
let os_version = process.platform;
let version = yield utils.getInput('php-version', true);
const os_version = process.platform;
const version = yield utils.getInput('php-version', true);
// check the os version and run the respective script
let script_path = '';
switch (os_version) {
@@ -64,11 +64,12 @@ function run() {
script_path = yield build(os_version + '.sh', version, os_version);
yield exec_1.exec('sh ' + script_path + ' ' + version + ' ' + __dirname);
break;
case 'linux':
let pecl = yield utils.getInput('pecl', false);
case 'linux': {
const pecl = yield utils.getInput('pecl', false);
script_path = yield build(os_version + '.sh', version, os_version);
yield exec_1.exec('sh ' + script_path + ' ' + version + ' ' + pecl);
break;
}
case 'win32':
script_path = yield build('win32.ps1', version, os_version);
yield exec_1.exec('pwsh ' + script_path + ' -version ' + version + ' -dir ' + __dirname);