Add support for phing

This commit is contained in:
Shivam Mathur 2020-08-24 12:11:17 +05:30
parent 9457ce6e2b
commit f641885a8d
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 16 additions and 1 deletions

View File

@ -375,7 +375,7 @@ describe('Tools tests', () => {
it('checking addTools on linux', async () => {
const script: string = await tools.addTools(
'blackfire, blackfire-player, cs2pr, flex, grpc_php_plugin, php-cs-fixer, phplint, phpstan, phpunit, pecl, phinx, phinx:1.2.3, phive, php-config, phpize, protoc, symfony, wp-cli',
'blackfire, blackfire-player, cs2pr, flex, grpc_php_plugin, php-cs-fixer, phplint, phpstan, phpunit, pecl, phing, phinx, phinx:1.2.3, phive, php-config, phpize, protoc, symfony, wp-cli',
'7.4',
'linux'
);
@ -395,6 +395,9 @@ describe('Tools tests', () => {
expect(script).toContain(
'add_tool https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar phpstan'
);
expect(script).toContain(
'add_tool https://www.phing.info/get/phing-latest.phar phing'
);
expect(script).toContain(
'add_tool https://phar.io/releases/phive.phar phive'
);
@ -432,6 +435,7 @@ describe('Tools tests', () => {
'infection',
'phan',
'phan:2.7.2',
'phing:1.2.3',
'phinx',
'phive:1.2.3',
'php-config',
@ -479,6 +483,9 @@ describe('Tools tests', () => {
expect(script).toContain(
'add_tool https://github.com/phan/phan/releases/latest/download/phan.phar phan'
);
expect(script).toContain(
'add_tool https://www.phing.info/get/phing-1.2.3.phar phing'
);
expect(script).toContain(
'add_tool https://github.com/squizlabs/PHP_CodeSniffer/releases/latest/download/phpcs.phar phpcs'
);

4
dist/index.js vendored
View File

@ -2106,6 +2106,10 @@ async function addTools(tools_csv, php_version, os_version) {
url = github + 'phan/phan/' + uri;
script += await addArchive(tool, url, os_version);
break;
case 'phing':
url = 'https://www.phing.info/get/phing-' + version + '.phar';
script += await addArchive(tool, url, os_version);
break;
case 'phinx':
script += await addPackage(tool, release, 'robmorgan/', os_version);
break;

View File

@ -505,6 +505,10 @@ export async function addTools(
url = github + 'phan/phan/' + uri;
script += await addArchive(tool, url, os_version);
break;
case 'phing':
url = 'https://www.phing.info/get/phing-' + version + '.phar';
script += await addArchive(tool, url, os_version);
break;
case 'phinx':
script += await addPackage(tool, release, 'robmorgan/', os_version);
break;