Skip to content

Commit 0888a3d

Browse files
committed
sanity_checks: allow changing subprojects/.gitignore without adding release
1 parent 04a7b68 commit 0888a3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/sanity_checks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@
159159
}
160160
FORMAT_CHECK_FILES = ['meson.build', 'meson_options.txt', 'meson.options']
161161
NO_TABS_FILES = ['meson.build', 'meson_options.txt', 'meson.options']
162+
SUBPROJECTS_METADATA_FILES = {'subprojects/.gitignore'}
162163
PERMITTED_KEYS = {'versions', 'dependency_names', 'program_names'}
163164
IGNORE_SETUP_WARNINGS = None # or re.compile(r'something')
164165

@@ -363,7 +364,7 @@ def test_releases(self) -> None:
363364
if not has_new_releases:
364365
last_tag = subprocess.check_output(['git', 'describe', '--tags', '--abbrev=0'], text=True, encoding='utf-8').strip()
365366
changed_files = subprocess.check_output(['git', 'diff', '--name-only', 'HEAD', last_tag], text=True, encoding='utf-8').splitlines()
366-
if any(f.startswith('subprojects') for f in changed_files):
367+
if any(f.startswith('subprojects') and f not in SUBPROJECTS_METADATA_FILES for f in changed_files):
367368
self.fail('Subprojects files changed but no new release added into releases.json')
368369

369370
@unittest.skipUnless('TEST_BUILD_ALL' in os.environ, 'Run manually only')

0 commit comments

Comments
 (0)