feat: prepare PCL-ISE 0.1.2 update test release
Release PCL-ISE / release (push) Canceled after 0s

This commit is contained in:
Coldsmile_7 committed 2026-10-27 23:57:25 +08:00
1 parent 5d549ff66a
commit e831d0dfe0
28 files changed
+1026 -286

No files matched your search

+4 -1
View File
@@ -12,6 +12,9 @@ internal static class CheckLauncherRelease {
[STAThread]
private static int Main(string[] args) {
try {
if (args.Length < 3) throw new ArgumentException("Usage: Check-LauncherRelease.exe <installed launcher> <expected release exe> <expected tag>");
string expectedTag = args[2];
string expectedVersion = AssemblyName.GetAssemblyName(Path.GetFullPath(args[1])).Version.ToString();
Assembly launcher = Assembly.LoadFrom(Path.GetFullPath(args[0]));
Activator.CreateInstance(launcher.GetType("PCL.Application", true), true);
Assembly core = Assembly.Load("MeloongCore");
@@ -37,7 +40,7 @@ internal static class CheckLauncherRelease {
throw new InvalidDataException("Release SHA256 does not match local build");
}
}
if (tag != "v0.1.1" || version != "0.1.1.0") throw new InvalidDataException("Unexpected test release version");
if (tag != expectedTag || version != expectedVersion) throw new InvalidDataException("Unexpected test release version");
bool newer = (bool)module.GetMethod("IsUpdateNewer", BindingFlags.Static | BindingFlags.NonPublic).Invoke(null, new object[] { info });
bool expectedNewer = new Version(version) > launcher.GetName().Version;
if (newer != expectedNewer) throw new InvalidDataException("Unexpected update comparison result");