Skip to content

Commit

Permalink
Chore: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Dec 16, 2024
1 parent f706b8f commit 65d2dc8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 2 additions & 6 deletions Build/build-chn-cidr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CN_CIDR_MISSING_IN_CHNROUTE, NON_CN_CIDR_INCLUDED_IN_CHNROUTE } from '.
import { appendArrayInPlace } from './lib/append-array-in-place';
import { IPListOutput } from './lib/create-file';
import { cachedOnlyFail } from './lib/fs-memo';
import { createFileDescription } from './constants/description';

const PROBE_CHN_CIDR_V4 = [
// NetEase Hangzhou
Expand Down Expand Up @@ -48,12 +49,7 @@ export const buildChnCidr = task(require.main === module, __filename)(async (spa
const [filteredCidr4, cidr6] = await span.traceChildAsync('download chnroutes2', getChnCidrPromise);

// Can not use SHARED_DESCRIPTION here as different license
const description = [
'License: CC BY-SA 2.0',
'Homepage: https://ruleset.skk.moe',
'GitHub: https://github.com/SukkaW/Surge',
''
];
const description = createFileDescription('CC BY-SA 2.0');

return Promise.all([
new IPListOutput(span, 'china_ip', false)
Expand Down
14 changes: 9 additions & 5 deletions Build/constants/description.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
export const SHARED_DESCRIPTION = [
'License: AGPL 3.0',
'Homepage: https://ruleset.skk.moe',
'GitHub: https://github.com/SukkaW/Surge'
];
export function createFileDescription(license = 'AGPL 3.0') {
return [
`License: ${license}`,
'Homepage: https://ruleset.skk.moe',
'GitHub: https://github.com/SukkaW/Surge'
];
}

export const SHARED_DESCRIPTION = createFileDescription('AGPL 3.0');

0 comments on commit 65d2dc8

Please sign in to comment.