This commit is contained in:
Mateusz Gruszczyński committed 2026-11-03 20:05:17 +01:00
1 parent ba300b2448
commit 6e5aa8e4e4
26 files changed
+814 -214

No files matched your search

+15 -3
View File
@@ -33,8 +33,8 @@ if package.get('edition') != '2024':
fail('Cargo.toml must use edition 2024')
if package.get('rust-version') != '1.99.1':
fail('Cargo.toml rust-version must be 1.99.1')
if package.get('version') != '0.0.1-dev':
fail('Cargo.toml version must be 0.0.1-dev during the development phase')
if package.get('version') != '0.0.2':
fail('Cargo.toml version must be 0.0.2 for this release')
if toolchain.get('toolchain', {}).get('channel') != '1.99.1':
fail('rust-toolchain.toml must pin 1.99.1')
@@ -132,6 +132,18 @@ for marker in ['/rspamd-dkim/generate', 'selector_map', 'path_map', 'RspamdDkimC
if marker not in project_text + '\n' + (ROOT / 'src/config.rs').read_text(encoding='utf-8'):
fail(f'missing Rspamd DKIM integration marker: {marker}')
release_002_markers = {
'src/routes/vacation.rs': ['sync_vacation_alias', 'vacation_address', 'validate_dates'],
'src/routes/aliases.rs': ['technical', 'internal_vacation', 'can_edit_description'],
'src/web/js/10-pages.js': ['vacationMailboxPicker', 'Aliasy techniczne', 'local_part'],
'packaging/postfixadmin-rs-rspamd-setup': ['postfixadmin-rspamd', 'systemctl restart postfixadmin-rs rspamd'],
}
for relative, markers in release_002_markers.items():
text_value = (ROOT / relative).read_text(encoding='utf-8')
for marker in markers:
if marker not in text_value:
fail(f'{relative}: missing 0.0.2 regression marker: {marker}')
node = shutil.which('node')
if node:
for path in sorted((ROOT / 'src/web/js').glob('*.js')):
@@ -139,7 +151,7 @@ if node:
if result.returncode:
fail(f'{path.relative_to(ROOT)}: node --check failed: {result.stderr.strip()}')
for script in [ROOT / 'dev.sh', ROOT / 'scripts/build-release.sh', ROOT / 'scripts/package-release.sh', ROOT / 'scripts/build-deb.sh']:
for script in [ROOT / 'dev.sh', ROOT / 'scripts/build-release.sh', ROOT / 'scripts/package-release.sh', ROOT / 'scripts/build-deb.sh', ROOT / 'packaging/postfixadmin-rs-rspamd-setup']:
result = subprocess.run(['bash', '-n', str(script)], capture_output=True, text=True)
if result.returncode:
fail(f'{script.relative_to(ROOT)}: bash -n failed: {result.stderr.strip()}')