v0.0.3
This commit is contained in:
1 parent
6e5aa8e4e4
commit
cdca612a59
17 files changed
+191
-62
No files matched your search
@@ -31,12 +31,17 @@ toolchain = load_toml(ROOT / 'rust-toolchain.toml')
|
||||
package = cargo.get('package', {})
|
||||
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.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')
|
||||
package_version = package.get('version')
|
||||
rust_version = package.get('rust-version')
|
||||
toolchain_channel = toolchain.get('toolchain', {}).get('channel')
|
||||
if not isinstance(package_version, str) or not re.fullmatch(r'\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?', package_version):
|
||||
fail('Cargo.toml package.version must be a valid semantic version')
|
||||
if not isinstance(rust_version, str) or not rust_version.strip():
|
||||
fail('Cargo.toml rust-version must be set')
|
||||
if not isinstance(toolchain_channel, str) or not toolchain_channel.strip():
|
||||
fail('rust-toolchain.toml toolchain.channel must be set')
|
||||
elif isinstance(rust_version, str) and toolchain_channel != rust_version:
|
||||
fail(f'Rust version mismatch: Cargo.toml requires {rust_version}, rust-toolchain.toml pins {toolchain_channel}')
|
||||
|
||||
for path in ROOT.glob('config*.toml'):
|
||||
load_toml(path)
|
||||
@@ -132,17 +137,38 @@ 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 = {
|
||||
compatibility_regression_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():
|
||||
for relative, markers in compatibility_regression_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}')
|
||||
fail(f'{relative}: missing compatibility regression marker: {marker}')
|
||||
|
||||
domain_ui_regression_markers = {
|
||||
'src/web/js/10-pages.js': [
|
||||
'aliasRows.filter(item => !item.is_mailbox)',
|
||||
'regularAliases = indexedAliases.filter(({ item }) => !item.technical)',
|
||||
'technicalAliases = indexedAliases.filter(({ item }) => item.technical)',
|
||||
'Aliasy użytkowników',
|
||||
'Aliasy techniczne',
|
||||
"['Adres', 'Cel', 'Opis', 'Status', 'Aktywny', '']",
|
||||
'aliasDestinations',
|
||||
'aliasTargetsCell',
|
||||
],
|
||||
'src/web/css/20-app.css': ['.workspace-grid{display:grid;grid-template-columns:1fr;'],
|
||||
'src/routes/aliases.rs': ['a.goto AS goto_value', 'row_string(row, "goto_value")'],
|
||||
'src/db.rs': ['row.try_get::<Vec<u8>, _>(name)', 'String::from_utf8(value)'],
|
||||
}
|
||||
for relative, markers in domain_ui_regression_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 domain UI regression marker: {marker}')
|
||||
|
||||
node = shutil.which('node')
|
||||
if node:
|
||||
|
||||
Reference in new issue
Block a user