mirror of
https://github.com/openRuyi-Project/openRuyi.git
synced 2026-04-28 11:03:42 +00:00
CI: Stricter packageing requirements
This commit is contained in:
@@ -23,7 +23,7 @@ repos:
|
||||
- id: autochangelog
|
||||
name: "check autochangelog macro"
|
||||
language: pygrep
|
||||
entry: '%changelog\s+(%autochangelog|%\{\?autochangelog\})'
|
||||
entry: '%changelog\s+%autochangelog'
|
||||
args: ["--negate", "--multiline"]
|
||||
files: \.spec$
|
||||
- id: format-spacing
|
||||
|
||||
@@ -18,8 +18,8 @@ def check_file(file_path):
|
||||
|
||||
# 步骤2: 如果存在,检查每一个 Source\d+ 行是否有注释
|
||||
for idx in sourcelines:
|
||||
if not re.match(r'^#!RemoteAsset(: +sha256:[0-9a-f]{64})?$', lines[idx - 1]):
|
||||
errors.append(f'\033[33m{file_path}:{idx}-{idx+1}\033[0m: \033[1;31mError\033[0m - The source line is missing the required #!RemoteAsset comment.\n{lines[idx-1]}\n{lines[idx]}\n---')
|
||||
if not re.match(r'^#!RemoteAsset: sha256:[0-9a-f]{64}$', lines[idx - 1]):
|
||||
errors.append(f'\033[33m{file_path}:{idx}-{idx+1}\033[0m: \033[1;31mError\033[0m - The source line is missing the required #!RemoteAsset: sha256:xxx comment.\n{lines[idx-1]}\n{lines[idx]}\n---')
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
Reference in New Issue
Block a user