Fix wp-cli support

This commit is contained in:
Shivam Mathur
2020-02-22 21:41:40 +05:30
parent d95ca49e8d
commit 68c827cfcf
6 changed files with 25 additions and 24 deletions

10
dist/index.js vendored
View File

@ -1872,13 +1872,9 @@ function getWpCliUrl(version) {
return __awaiter(this, void 0, void 0, function* () {
switch (version) {
case 'latest':
return 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar';
return 'wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true';
default:
return ('https://github.com/wp-cli/wp-cli/releases/download/v' +
version +
'/wp-cli-' +
version +
'.phar');
return yield getUri('wp-cli', '-' + version + '.phar', version, 'wp-cli/wp-cli/releases', 'v', 'download');
}
});
}
@ -2069,7 +2065,7 @@ function addTools(tools_csv, php_version, os_version) {
script += yield addArchive('symfony', version, url, os_version);
break;
case 'wp-cli':
url = yield getWpCliUrl(version);
url = github + (yield getWpCliUrl(version));
script += yield addArchive(tool, version, url, os_version);
break;
default: