Update Phive configuration

This commit is contained in:
Shivam Mathur 2021-08-23 12:38:05 +05:30
parent 506357cdb9
commit e59c938e82
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 11 additions and 0 deletions

View File

@ -127,6 +127,11 @@ describe('Tools tests', () => {
expect(script).toContain( expect(script).toContain(
'Add-Tool https://github.com/phar-io/phive/releases/download/0.13.5/phive-0.13.5.phar phive' 'Add-Tool https://github.com/phar-io/phive/releases/download/0.13.5/phive-0.13.5.phar phive'
); );
script = await tools.addPhive('latest', '7.2', 'win32');
expect(script).toContain(
'Add-Tool https://github.com/phar-io/phive/releases/download/0.14.5/phive-0.14.5.phar phive'
);
}); });
it('checking getPhpunitUri', async () => { it('checking getPhpunitUri', async () => {

3
dist/index.js vendored
View File

@ -571,6 +571,9 @@ async function addPhive(version, php_version, os_version) {
case /7\.1/.test(php_version): case /7\.1/.test(php_version):
version = version.replace('latest', '0.13.5'); version = version.replace('latest', '0.13.5');
break; break;
case /7\.2/.test(php_version):
version = version.replace('latest', '0.14.5');
break;
} }
switch (version) { switch (version) {
case 'latest': case 'latest':

View File

@ -119,6 +119,9 @@ export async function addPhive(
case /7\.1/.test(php_version): case /7\.1/.test(php_version):
version = version.replace('latest', '0.13.5'); version = version.replace('latest', '0.13.5');
break; break;
case /7\.2/.test(php_version):
version = version.replace('latest', '0.14.5');
break;
} }
switch (version) { switch (version) {
case 'latest': case 'latest':