Refactor scripts and fix reading php-version

This commit is contained in:
Shivam Mathur
2019-12-20 18:29:05 +05:30
parent a507be73b5
commit 935e74fb40
5 changed files with 173 additions and 133 deletions

View File

@@ -49,7 +49,7 @@ export async function run(): Promise<void> {
try {
const os_version: string = process.platform;
let version: string = await utils.getInput('php-version', true);
version = version.length > 1 ? version : version + '.0';
version = version.length > 1 ? version.slice(0, 3) : version + '.0';
// check the os version and run the respective script
let script_path = '';
switch (os_version) {