build(train): Train is released as Learn is, with a key of its own, beside it in the F-Droid repository (ADR 0030, D58)

apps/train/release.dart configures the release tool for Train's APK on
train.halkyon.eu; its release builds sign with its own key when the tool
hands it over. Its F-Droid listing declares NonFreeDep for Polar's SDK and
NonFreeNet; the repository's script copies each app's icon. The key's
certificate is pinned once the key is made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-30 16:40:12 +01:00
commit 48951c1e1a
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -3,6 +3,7 @@ import 'dart:io';
import 'package:test/test.dart';
import '../../apps/learn/release.dart';
import '../../apps/train/release.dart';
import '../../tool/src/release/apps.dart';
import '../../tool/src/release/version.dart';
import 'fixtures.dart';
@ -74,4 +75,37 @@ void main() {
contains('name: ${learnRelease.snap!.name}\n'),
);
});
test("Train's release is registered, sound, names files that exist, and "
'has a key of its own', () {
expect(releasedApps['train'], same(trainRelease));
expect(trainRelease.problems(), isEmpty);
for (final path in [
trainRelease.pubspec,
trainRelease.android.certificateFile,
...trainRelease.releaseFiles,
]) {
expect(
FileSystemEntity.typeSync(path),
isNot(FileSystemEntityType.notFound),
reason: path,
);
}
expect(trainRelease.snap, isNull);
expect(
trainRelease.android.certificateFile,
isNot(learnRelease.android.certificateFile),
);
expect(
trainRelease.android.defaultKeystore,
isNot(learnRelease.android.defaultKeystore),
);
expect(
File(
'${trainRelease.fdroid!.listing}/metadata/'
'${trainRelease.applicationId}.yml',
).readAsStringSync(),
contains('NonFreeDep'),
);
});
}