mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 17:20:35 +08:00
Perf: speed up download previous build
This commit is contained in:
parent
6b324f4079
commit
a02038704f
@ -17,17 +17,24 @@ const fileExists = (path) => {
|
|||||||
(async () => {
|
(async () => {
|
||||||
const filesList = [];
|
const filesList = [];
|
||||||
|
|
||||||
|
let allFileExists = true;
|
||||||
|
|
||||||
for await (const line of readFileByLine(resolve(__dirname, '../.gitignore'))) {
|
for await (const line of readFileByLine(resolve(__dirname, '../.gitignore'))) {
|
||||||
if (line.startsWith('List/') && !line.endsWith('/')) {
|
if (
|
||||||
filesList.push(line);
|
(
|
||||||
|
line.startsWith('List/')
|
||||||
|
|| line.startsWith('Modules/')
|
||||||
|
) && !line.endsWith('/')
|
||||||
|
) {
|
||||||
|
allFileExists = await fileExists(join(__dirname, '..', line));
|
||||||
|
|
||||||
|
if (!allFileExists) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (allFileExists) {
|
||||||
!((await Promise.all(
|
|
||||||
filesList.map(p => fileExists(join(__dirname, '..', p)))
|
|
||||||
)).some(exist => !exist))
|
|
||||||
) {
|
|
||||||
console.log('All files exists, skip download.');
|
console.log('All files exists, skip download.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -83,7 +83,6 @@ module.exports.DOMESTICS = /** @type {const} */({
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
BYTEDANCE: {
|
BYTEDANCE: {
|
||||||
// Currently, bytedance all NS are pointed to AliDNS
|
|
||||||
dns: '180.184.2.2',
|
dns: '180.184.2.2',
|
||||||
domains: [
|
domains: [
|
||||||
'bytecdn.cn',
|
'bytecdn.cn',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user