mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Add GitHub releases fallback URL for phing
This commit is contained in:
parent
293da043d1
commit
94c859a50e
@ -412,7 +412,7 @@ describe('Tools tests', () => {
|
|||||||
'add_tool https://github.com/infection/infection/releases/latest/download/infection.phar infection "-V"',
|
'add_tool https://github.com/infection/infection/releases/latest/download/infection.phar infection "-V"',
|
||||||
'add_tool https://github.com/phan/phan/releases/latest/download/phan.phar phan "-v"',
|
'add_tool https://github.com/phan/phan/releases/latest/download/phan.phar phan "-v"',
|
||||||
'add_tool https://github.com/phan/phan/releases/download/1.2.3/phan.phar phan "-v"',
|
'add_tool https://github.com/phan/phan/releases/download/1.2.3/phan.phar phan "-v"',
|
||||||
'add_tool https://www.phing.info/get/phing-1.2.3.phar phing "-v"',
|
'add_tool https://www.phing.info/get/phing-1.2.3.phar,https://github.com/phingofficial/phing/releases/download/1.2.3/phing-1.2.3.phar phing "-v"',
|
||||||
'add_composertool phinx phinx robmorgan/ scoped',
|
'add_composertool phinx phinx robmorgan/ scoped',
|
||||||
'add_tool https://github.com/phar-io/phive/releases/download/1.2.3/phive-1.2.3.phar phive',
|
'add_tool https://github.com/phar-io/phive/releases/download/1.2.3/phive-1.2.3.phar phive',
|
||||||
'add_devtools php-config',
|
'add_devtools php-config',
|
||||||
|
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -789,6 +789,12 @@ exports.addPECL = addPECL;
|
|||||||
async function addPhing(data) {
|
async function addPhing(data) {
|
||||||
data['url'] =
|
data['url'] =
|
||||||
data['domain'] + '/get/phing-' + data['version'] + data['extension'];
|
data['domain'] + '/get/phing-' + data['version'] + data['extension'];
|
||||||
|
if (data['version'] != 'latest') {
|
||||||
|
[data['prefix'], data['verb']] = ['releases', 'download'];
|
||||||
|
data['domain'] = data['github'];
|
||||||
|
data['extension'] = '-' + data['version'] + data['extension'];
|
||||||
|
data['url'] += ',' + (await getUrl(data));
|
||||||
|
}
|
||||||
return await addArchive(data);
|
return await addArchive(data);
|
||||||
}
|
}
|
||||||
exports.addPhing = addPhing;
|
exports.addPhing = addPhing;
|
||||||
|
@ -313,6 +313,12 @@ export async function addPECL(data: RS): Promise<string> {
|
|||||||
export async function addPhing(data: RS): Promise<string> {
|
export async function addPhing(data: RS): Promise<string> {
|
||||||
data['url'] =
|
data['url'] =
|
||||||
data['domain'] + '/get/phing-' + data['version'] + data['extension'];
|
data['domain'] + '/get/phing-' + data['version'] + data['extension'];
|
||||||
|
if (data['version'] != 'latest') {
|
||||||
|
[data['prefix'], data['verb']] = ['releases', 'download'];
|
||||||
|
data['domain'] = data['github'];
|
||||||
|
data['extension'] = '-' + data['version'] + data['extension'];
|
||||||
|
data['url'] += ',' + (await getUrl(data));
|
||||||
|
}
|
||||||
return await addArchive(data);
|
return await addArchive(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user