This commit is contained in:
1 parent
5d549ff66a
commit
e831d0dfe0
28 files changed
+1026
-286
No files matched your search
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user