mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-25 05:01:07 +07:00
Fix regression in major/minor.major version support for phpunit
This commit is contained in:
parent
948bd8df3c
commit
d2f333de6f
3
dist/index.js
vendored
3
dist/index.js
vendored
@ -946,7 +946,7 @@ exports.addPhive = addPhive;
|
||||
async function addPHPUnitTools(data) {
|
||||
if (data['version'] === 'latest') {
|
||||
data['version'] =
|
||||
(await packagist.search(data['repository'], data['php_version'])) ??
|
||||
(await packagist.search(data['packagist'], data['php_version'])) ??
|
||||
'latest';
|
||||
}
|
||||
data['url'] = await getPharUrl(data);
|
||||
@ -1000,6 +1000,7 @@ async function getData(release, php_version, os) {
|
||||
data['extension'] ??= '.phar';
|
||||
data['os'] = os;
|
||||
data['php_version'] = php_version;
|
||||
data['packagist'] ??= data['repository'];
|
||||
data['prefix'] = data['github'] === data['domain'] ? 'releases' : '';
|
||||
data['verb'] = data['github'] === data['domain'] ? 'download' : '';
|
||||
data['fetch_latest'] ??= 'false';
|
||||
|
@ -267,7 +267,8 @@
|
||||
},
|
||||
"phpunit": {
|
||||
"type": "custom-function",
|
||||
"repository": "phpunit/phpunit",
|
||||
"repository": "sebastianbergmann/phpunit",
|
||||
"packagist": "phpunit/phpunit",
|
||||
"domain": "https://phar.phpunit.de",
|
||||
"function": "phpunit",
|
||||
"version_prefix": "",
|
||||
|
@ -13,6 +13,7 @@
|
||||
"fetch_latest": "true",
|
||||
"function": "function_name",
|
||||
"repository": "user/tool",
|
||||
"packagist": "user/tool",
|
||||
"scope": "global, scoped",
|
||||
"type": "phar, composer, custom-package or custom-function",
|
||||
"version_parameter": "--version",
|
||||
@ -77,6 +78,15 @@
|
||||
"user/tool"
|
||||
]
|
||||
},
|
||||
"packagist": {
|
||||
"$id": "#/items/properties/packagist",
|
||||
"type": "string",
|
||||
"title": "The repository schema",
|
||||
"description": "Packagist repository of the tool in case different from repository.",
|
||||
"examples": [
|
||||
"user/tool"
|
||||
]
|
||||
},
|
||||
"scope": {
|
||||
"$id": "#/items/properties/scope",
|
||||
"type": "string",
|
||||
|
@ -395,7 +395,7 @@ export async function addPhive(data: RS): Promise<string> {
|
||||
export async function addPHPUnitTools(data: RS): Promise<string> {
|
||||
if (data['version'] === 'latest') {
|
||||
data['version'] =
|
||||
(await packagist.search(data['repository'], data['php_version'])) ??
|
||||
(await packagist.search(data['packagist'], data['php_version'])) ??
|
||||
'latest';
|
||||
}
|
||||
data['url'] = await getPharUrl(data);
|
||||
@ -464,6 +464,7 @@ export async function getData(
|
||||
data['extension'] ??= '.phar';
|
||||
data['os'] = os;
|
||||
data['php_version'] = php_version;
|
||||
data['packagist'] ??= data['repository'];
|
||||
data['prefix'] = data['github'] === data['domain'] ? 'releases' : '';
|
||||
data['verb'] = data['github'] === data['domain'] ? 'download' : '';
|
||||
data['fetch_latest'] ??= 'false';
|
||||
|
Loading…
Reference in New Issue
Block a user