mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Shorten output in build script
This commit is contained in:
parent
d9055b0307
commit
d1987f88ee
1 changed files with 3 additions and 3 deletions
|
|
@ -118,7 +118,7 @@ const logProgress = text => {
|
|||
/******************************************************************************/
|
||||
|
||||
async function fetchText(url, cacheDir) {
|
||||
logProgress(`Reading locally cached ${url}`);
|
||||
logProgress(`Reading locally cached ${path.basename(url)}`);
|
||||
const fname = url
|
||||
.replace(/^https?:\/\//, '')
|
||||
.replace(/\//g, '_');(url);
|
||||
|
|
@ -130,7 +130,7 @@ async function fetchText(url, cacheDir) {
|
|||
log(`\tFetched local ${url}`);
|
||||
return { url, content };
|
||||
}
|
||||
logProgress(`Fetching remote ${url}`);
|
||||
logProgress(`Fetching remote ${path.basename(url)}`);
|
||||
log(`\tFetching remote ${url}`);
|
||||
const response = await fetch(url).catch(( ) => { });
|
||||
if ( response === undefined ) {
|
||||
|
|
@ -152,7 +152,7 @@ async function fetchText(url, cacheDir) {
|
|||
async function fallbackFetchText(url) {
|
||||
const match = /^https:\/\/raw\.githubusercontent\.com\/([^/]+)\/([^/]+)\/master\/([^?]+)/.exec(url);
|
||||
if ( match === null ) { return; }
|
||||
logProgress(`\tGitHub CLI-fetching remote ${url}`);
|
||||
logProgress(`\tGitHub CLI-fetching remote ${path.basename(url)}`);
|
||||
// https://docs.github.com/en/rest/repos/contents
|
||||
const content = execSync(`gh api \
|
||||
-H "Accept: application/vnd.github.raw+json" \
|
||||
|
|
|
|||
Loading…
Reference in a new issue