mirror of
https://github.com/cogwheel0/conduit.git
synced 2026-10-19 17:53:43 +00:00
* feat: bundled JSON release notes for 4.0, polished changelog sheet, remove IAP - Move release-note content from ARB to assets/release_notes/<locale>.json with locale-fallback repository and schema-checked validator - Polish the release notes sheet (staggered reveal, version badge, feature glyph bullets, action cards) and add the 4.0 note in 13 locales - Prune pre-4.0 notes - Remove in_app_purchase and the tip jar entirely; keep the Buy Me a Coffee donation link on all platforms * Refresh release notes sheet and localized copy * Add release notes banner and native review support * Redesign release announcement sheet * Target release announcement to 4.0.1 * Address release announcement review feedback * Tighten release note locale handling
46 lines
1.1 KiB
Dart
46 lines
1.1 KiB
Dart
import 'dart:io';
|
|
|
|
import 'release_notes_validator.dart';
|
|
|
|
void main(List<String> args) {
|
|
final version = _readVersionArg(args);
|
|
if (version == null) {
|
|
stderr.writeln(
|
|
'Usage: dart tool/validate_release_notes.dart --version x.y.z',
|
|
);
|
|
exitCode = 64;
|
|
return;
|
|
}
|
|
|
|
final result = validateReleaseNotes(
|
|
version: version,
|
|
arbDirectory: Directory('lib/l10n'),
|
|
notesDirectory: Directory('assets/release_notes'),
|
|
);
|
|
if (result.isValid) {
|
|
stdout.writeln('Release notes validated for $version.');
|
|
return;
|
|
}
|
|
|
|
stderr.writeln('Release notes validation failed for $version:');
|
|
for (final error in result.errors) {
|
|
stderr.writeln('- $error');
|
|
}
|
|
exitCode = 1;
|
|
}
|
|
|
|
String? _readVersionArg(List<String> args) {
|
|
for (var i = 0; i < args.length; i++) {
|
|
final arg = args[i];
|
|
if (arg == '--version' && i + 1 < args.length) {
|
|
return args[i + 1].trim();
|
|
}
|
|
if (arg.startsWith('--version=')) {
|
|
return arg.substring('--version='.length).trim();
|
|
}
|
|
}
|
|
if (args.length == 1 && !args.first.startsWith('-')) {
|
|
return args.first.trim();
|
|
}
|
|
return null;
|
|
}
|