mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-03 12:31:54 +08:00
New build infra: Build for Clash (#11)
This commit is contained in:
@@ -28,21 +28,38 @@ const EXCLUDE_CIDRS = [
|
||||
const filteredCidr = excludeCidrs(Array.from(cidr), EXCLUDE_CIDRS, true);
|
||||
console.log('After Merge:', filteredCidr.length);
|
||||
|
||||
await compareAndWriteFile(
|
||||
withBannerArray(
|
||||
'Sukka\'s Surge Rules - Mainland China IPv4 CIDR',
|
||||
[
|
||||
'License: CC BY-SA 2.0',
|
||||
'Homepage: https://ruleset.skk.moe',
|
||||
'GitHub: https://github.com/SukkaW/Surge',
|
||||
'',
|
||||
'Data from https://misaka.io (misakaio @ GitHub)'
|
||||
],
|
||||
new Date(),
|
||||
filteredCidr.map(i => `IP-CIDR,${i}`)
|
||||
await Promise.all([
|
||||
compareAndWriteFile(
|
||||
withBannerArray(
|
||||
'Sukka\'s Ruleset - Mainland China IPv4 CIDR',
|
||||
[
|
||||
'License: CC BY-SA 2.0',
|
||||
'Homepage: https://ruleset.skk.moe',
|
||||
'GitHub: https://github.com/SukkaW/Surge',
|
||||
'',
|
||||
'Data from https://misaka.io (misakaio @ GitHub)'
|
||||
],
|
||||
new Date(),
|
||||
filteredCidr.map(i => `IP-CIDR,${i}`)
|
||||
),
|
||||
pathResolve(__dirname, '../List/ip/china_ip.conf')
|
||||
),
|
||||
pathResolve(__dirname, '../List/ip/china_ip.conf')
|
||||
);
|
||||
compareAndWriteFile(
|
||||
withBannerArray(
|
||||
'Sukka\'s Ruleset - Mainland China IPv4 CIDR',
|
||||
[
|
||||
'License: CC BY-SA 2.0',
|
||||
'Homepage: https://ruleset.skk.moe',
|
||||
'GitHub: https://github.com/SukkaW/Surge',
|
||||
'',
|
||||
'Data from https://misaka.io (misakaio @ GitHub)'
|
||||
],
|
||||
new Date(),
|
||||
filteredCidr
|
||||
),
|
||||
pathResolve(__dirname, '../Clash/ip/china_ip.txt')
|
||||
)
|
||||
]);
|
||||
|
||||
console.timeEnd('Total Time - build-chnroutes-cidr');
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user