From 1610dd0939373cf51ab0cbc9e96dfcd10e1c72d9 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Fri, 15 Sep 2023 11:58:16 +0800 Subject: [PATCH] Docs: fix README Clash usage --- Build/download-previous-build.js | 24 +++++++++++++----------- README.md | 4 ++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Build/download-previous-build.js b/Build/download-previous-build.js index d4e78816..e0d70f30 100644 --- a/Build/download-previous-build.js +++ b/Build/download-previous-build.js @@ -21,19 +21,17 @@ const downloadPreviousBuild = task(__filename, async () => { let allFileExists = true; - if (isCI) { - allFileExists = false; - } else { - for await (const line of readFileByLine(resolve(__dirname, '../.gitignore'))) { - if ( - ( + for await (const line of readFileByLine(resolve(__dirname, '../.gitignore'))) { + if ( + ( // line.startsWith('List/') - line.startsWith('Modules/') - ) && !line.endsWith('/') - ) { - allFileExists = fs.existsSync(join(__dirname, '..', line)); - filesList.push(line); + line.startsWith('Modules/') + ) && !line.endsWith('/') + ) { + filesList.push(line); + if (!isCI) { + allFileExists = fs.existsSync(join(__dirname, '..', line)); if (!allFileExists) { console.log(`File not exists: ${line}`); break; @@ -42,6 +40,10 @@ const downloadPreviousBuild = task(__filename, async () => { } } + if (isCI) { + allFileExists = false; + } + if (allFileExists) { console.log('All files exists, skip download.'); return; diff --git a/README.md b/README.md index f69638e5..3b920474 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ rules: # WARNING! Using reject_domainset can cause Clash out of memory due to the insufficient Clash implementation. - RULE-SET,reject_domainset,REJECT - RULE-SET,reject_phishing_domainset,REJECT - - RULE-SET,reject_ip,REJECT-DROP + - RULE-SET,reject_ip,REJECT ``` #### 搜狗输入法 @@ -343,7 +343,7 @@ rule-providers: behavior: classical format: text interval: 43200 - url: domestic_ip + url: https://ruleset.skk.moe/Clash/ip/domestic.txt path: ./sukkaw_ruleset/domestic_ip.txt rules: