mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-07-23 23:29:07 +07:00
Add support for PHP 8.0.0-dev #104
This commit is contained in:
24
dist/index.js
vendored
24
dist/index.js
vendored
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user