mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-08-16 10:34:40 +07:00
Add support for phive
This commit is contained in:
28
dist/index.js
vendored
28
dist/index.js
vendored
@ -1731,6 +1731,31 @@ function getCodeceptionUri(version, php_version) {
|
||||
});
|
||||
}
|
||||
exports.getCodeceptionUri = getCodeceptionUri;
|
||||
/**
|
||||
* Helper function to get script to setup phive
|
||||
*
|
||||
* @param tool
|
||||
* @param version
|
||||
* @param url
|
||||
* @param os_version
|
||||
*/
|
||||
function addPhive(version, os_version) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
switch (version) {
|
||||
case 'latest':
|
||||
return ((yield getArchiveCommand(os_version)) +
|
||||
'https://phar.io/releases/phive.phar phive');
|
||||
default:
|
||||
return ((yield getArchiveCommand(os_version)) +
|
||||
'https://github.com/phar-io/phive/releases/download/' +
|
||||
version +
|
||||
'/phive-' +
|
||||
version +
|
||||
'.phar phive');
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.addPhive = addPhive;
|
||||
/**
|
||||
* Function to get the PHPUnit url
|
||||
*
|
||||
@ -1888,6 +1913,9 @@ function addTools(tools_csv, php_version, os_version) {
|
||||
url = github + 'squizlabs/PHP_CodeSniffer/' + uri;
|
||||
script += yield addArchive(tool, version, url, os_version);
|
||||
break;
|
||||
case 'phive':
|
||||
script += yield addPhive(version, os_version);
|
||||
break;
|
||||
case 'phpstan':
|
||||
url = github + 'phpstan/phpstan/' + uri;
|
||||
script += yield addArchive(tool, version, url, os_version);
|
||||
|
Reference in New Issue
Block a user