Skip to content

Commit

Permalink
Merge pull request #481 from jrfnl/feature/update-phive-config
Browse files Browse the repository at this point in the history
Update Phive configuration
  • Loading branch information
shivammathur committed Aug 1, 2021
2 parents 1246159 + f31d416 commit cd660de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions __tests__/tools.test.ts
Expand Up @@ -201,6 +201,7 @@ describe('Tools tests', () => {
version | php_version | os_version | script
${'latest'} | ${'7.4'} | ${'linux'} | ${'add_tool https://phar.io/releases/phive.phar phive'}
${'1.2.3'} | ${'7.4'} | ${'darwin'} | ${'add_tool https://github.com/phar-io/phive/releases/download/1.2.3/phive-1.2.3.phar phive'}
${'1.2.3'} | ${'7.2'} | ${'win32'} | ${'Add-Tool https://github.com/phar-io/phive/releases/download/0.14.5/phive-0.14.5.phar phive'}
${'1.2.3'} | ${'7.1'} | ${'win32'} | ${'Add-Tool https://github.com/phar-io/phive/releases/download/0.13.5/phive-0.13.5.phar phive'}
${'latest'} | ${'5.6'} | ${'win32'} | ${'Add-Tool https://github.com/phar-io/phive/releases/download/0.12.1/phive-0.12.1.phar phive'}
${'latest'} | ${'5.5'} | ${'win32'} | ${'Phive is not supported on PHP 5.5'}
Expand Down
3 changes: 3 additions & 0 deletions dist/index.js
Expand Up @@ -686,6 +686,9 @@ async function addPhive(data) {
case /7\.1/.test(data['php_version']):
data['version'] = data['version'].replace('latest', '0.13.5');
break;
case /7\.2/.test(data['php_version']):
data['version'] = data['version'].replace('latest', '0.14.5');
break;
}
if (data['version'] === 'latest') {
data['domain'] = data['domain'] + '/releases';
Expand Down
3 changes: 3 additions & 0 deletions src/tools.ts
Expand Up @@ -299,6 +299,9 @@ export async function addPhive(data: RS): Promise<string> {
case /7\.1/.test(data['php_version']):
data['version'] = data['version'].replace('latest', '0.13.5');
break;
case /7\.2/.test(data['php_version']):
data['version'] = data['version'].replace('latest', '0.14.5');
break;
}
if (data['version'] === 'latest') {
data['domain'] = data['domain'] + '/releases';
Expand Down

0 comments on commit cd660de

Please sign in to comment.