Add support for PHP 8.0.0-dev #104

This commit is contained in:
Shivam Mathur
2019-12-09 08:09:03 +05:30
parent 14acb26bdc
commit 1cf6a369bb
11 changed files with 156 additions and 108 deletions

24
dist/index.js vendored
View File

@ -682,26 +682,6 @@ function getInput(name, mandatory) {
});
}
exports.getInput = getInput;
/**
* Function to read the PHP version.
*/
function getVersion() {
return __awaiter(this, void 0, void 0, function* () {
const version = yield getInput('php-version', true);
switch (version) {
case '8.0':
case '8.0-dev':
case '7.4':
case '7.4snapshot':
case '7.4nightly':
case 'nightly':
return '7.4';
default:
return version;
}
});
}
exports.getVersion = getVersion;
/**
* Async foreach loop
*
@ -1525,7 +1505,7 @@ function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
const os_version = process.platform;
const version = yield utils.getVersion();
const version = yield utils.getInput('php-version', true);
// check the os version and run the respective script
let script_path = '';
switch (os_version) {
@ -1541,7 +1521,7 @@ function run() {
}
case 'win32':
script_path = yield build('win32.ps1', version, os_version);
yield exec_1.exec('pwsh ' + script_path + ' -version ' + version + ' -dir ' + __dirname);
yield exec_1.exec('pwsh ' + script_path + ' -version ' + version);
break;
}
}