Fix composer version

This commit is contained in:
Shivam Mathur 2020-02-25 22:05:48 +05:30
parent 14d702e830
commit 5de6285e1f
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 12 additions and 8 deletions

View File

@ -372,7 +372,7 @@ describe('Tools tests', () => {
'linux'
);
expect(script).toContain(
'add_tool https://github.com/composer/composer/releases/latest/download/composer.phar composer'
'add_tool https://getcomposer.org/composer-stable.phar composer'
);
expect(script).toContain(
'add_tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr cs2pr'
@ -410,7 +410,7 @@ describe('Tools tests', () => {
'darwin'
);
expect(script).toContain(
'add_tool https://github.com/composer/composer/releases/latest/download/composer.phar composer'
'add_tool https://getcomposer.org/composer-stable.phar composer'
);
expect(script).toContain(
'add_tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/download/1.2.3/cs2pr cs2pr'
@ -457,7 +457,7 @@ describe('Tools tests', () => {
'win32'
);
expect(script).toContain(
'Add-Tool https://github.com/composer/composer/releases/latest/download/composer.phar composer'
'Add-Tool https://getcomposer.org/composer-stable.phar composer'
);
expect(script).toContain(
'Add-Tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr cs2pr'
@ -494,7 +494,7 @@ describe('Tools tests', () => {
'win32'
);
expect(script).toContain(
'Add-Tool https://github.com/composer/composer/releases/latest/download/composer.phar composer'
'Add-Tool https://getcomposer.org/composer-stable.phar composer'
);
expect(script).toContain(
'Add-Composer-Tool prestissimo prestissimo hirak/'

6
dist/index.js vendored
View File

@ -2023,8 +2023,10 @@ function addTools(tools_csv, php_version, os_version) {
script += yield addArchive(tool, version, url, os_version);
break;
case 'composer':
url =
github + 'composer/composer/releases/latest/download/composer.phar';
// If RC is released as latest release, switch to getcomposer.
// Prefered source is GitHub as it is faster.
// url = github + 'composer/composer/releases/latest/download/composer.phar';
url = 'https://getcomposer.org/composer-stable.phar';
script += yield addArchive(tool, version, url, os_version);
break;
case 'codeception':

View File

@ -498,8 +498,10 @@ export async function addTools(
script += await addArchive(tool, version, url, os_version);
break;
case 'composer':
url =
github + 'composer/composer/releases/latest/download/composer.phar';
// If RC is released as latest release, switch to getcomposer.
// Prefered source is GitHub as it is faster.
// url = github + 'composer/composer/releases/latest/download/composer.phar';
url = 'https://getcomposer.org/composer-stable.phar';
script += await addArchive(tool, version, url, os_version);
break;
case 'codeception':