diff --git a/README.md b/README.md index 9b0e3175..12358c11 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ with: These tools can be setup globally using the `tools` input. -`blackfire`, `blackfire-player`, `codeception`, `composer`, `composer-prefetcher`, `cs2pr`, `deployer`, `flex`, `infection`, `pecl`, `phan`, `phinx`, `phive`, `phpcbf`, `phpcpd`, `php-config`, `php-cs-fixer`, `phpcs`, `phpize`, `phpmd`, `phpstan`, `phpunit`, `prestissimo`, `psalm`, `symfony`, `vapor-cli` +`blackfire`, `blackfire-player`, `codeception`, `composer`, `composer-normalize`, `composer-prefetcher`, `cs2pr`, `deployer`, `flex`, `infection`, `pecl`, `phan`, `phinx`, `phive`, `phpcbf`, `phpcpd`, `php-config`, `php-cs-fixer`, `phpcs`, `phpize`, `phpmd`, `phpstan`, `phpunit`, `prestissimo`, `psalm`, `symfony`, `vapor-cli` ```yaml uses: shivammathur/setup-php@v2 diff --git a/__tests__/tools.test.ts b/__tests__/tools.test.ts index 92efb684..216cf508 100644 --- a/__tests__/tools.test.ts +++ b/__tests__/tools.test.ts @@ -447,7 +447,7 @@ describe('Tools tests', () => { }); it('checking addTools on darwin', async () => { const script: string = await tools.addTools( - 'blackfire, blackfire-player, flex, infection, phan, phpcs, phpcbf, phpcpd, phpmd, psalm, phinx, vapor-cli, phan:2.7.2, phive:1.2.3, cs2pr:1.2.3, composer-prefetcher:1.2.3, phpize, php-config, symfony, symfony:1.2.3, wp-cli', + 'blackfire, blackfire-player, composer-normalize, flex, infection, phan, phpcs, phpcbf, phpcpd, phpmd, psalm, phinx, vapor-cli, phan:2.7.2, phive:1.2.3, cs2pr:1.2.3, composer-prefetcher:1.2.3, phpize, php-config, symfony, symfony:1.2.3, wp-cli', '7.4', 'darwin' ); @@ -458,6 +458,9 @@ describe('Tools tests', () => { expect(script).toContain( 'add_tool https://getcomposer.org/composer-stable.phar composer' ); + expect(script).toContain( + 'add_tool https://github.com/ergebnis/composer-normalize/releases/latest/download/composer-normalize.phar composer-normalize' + ); expect(script).toContain( 'add_tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/download/1.2.3/cs2pr cs2pr' ); diff --git a/dist/index.js b/dist/index.js index f3d7ba01..79dcb6f1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2296,6 +2296,11 @@ async function addTools(tools_csv, php_version, os_version) { url = await getPharUrl('https://get.blackfire.io', tool, 'v', version); script += await addArchive(tool, version, url, os_version); break; + case 'composer-normalize': + uri = await getUri(tool, '.phar', version, 'releases', '', 'download'); + url = github + 'ergebnis/composer-normalize/' + uri; + script += await addArchive(tool, version, url, os_version); + break; case 'cs2pr': uri = await getUri(tool, '', version, 'releases', '', 'download'); url = github + 'staabm/annotate-pull-request-from-checkstyle/' + uri; diff --git a/src/tools.ts b/src/tools.ts index 757bf221..f7db39ec 100644 --- a/src/tools.ts +++ b/src/tools.ts @@ -477,6 +477,11 @@ export async function addTools( url = await getPharUrl('https://get.blackfire.io', tool, 'v', version); script += await addArchive(tool, version, url, os_version); break; + case 'composer-normalize': + uri = await getUri(tool, '.phar', version, 'releases', '', 'download'); + url = github + 'ergebnis/composer-normalize/' + uri; + script += await addArchive(tool, version, url, os_version); + break; case 'cs2pr': uri = await getUri(tool, '', version, 'releases', '', 'download'); url = github + 'staabm/annotate-pull-request-from-checkstyle/' + uri;