aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common
diff options
context:
space:
mode:
authorMary <mary@mary.zone>2022-01-22 17:56:09 +0100
committerMary <mary@mary.zone>2022-01-22 17:56:09 +0100
commit23000eeb9a021455e62cfe82c731d9a52f645e34 (patch)
tree976e998bed670fd87b8dd92637f7284868cf1dd5 /Ryujinx.Common
parent646d4dd5c715492a192efa234741ae40b846593f (diff)
Add new release system
As AppVeyor took our project down and deleted it without any comments, we are switching to GitHub Releases earlier than anticipated. This isn't the most elegant design (and I would have prefered having a release manifest in place) but this will do for now. The concept of release channel was also defined with this change. The new base version is now 1.1.x to avoid confusion with older system. Standard test CI was disabled temporarly and may be chained later as a CI job after the release job. Users are expected to redownload the emulator to be sure to be up to date. PS: If someone from AppVeyor read this, thanks again for ruining my week-end, I will be sure to NEVER recommend you to anyone. Best Regards, Mary.
Diffstat (limited to 'Ryujinx.Common')
-rw-r--r--Ryujinx.Common/Logging/Targets/FileLogTarget.cs2
-rw-r--r--Ryujinx.Common/ReleaseInformations.cs32
2 files changed, 33 insertions, 1 deletions
diff --git a/Ryujinx.Common/Logging/Targets/FileLogTarget.cs b/Ryujinx.Common/Logging/Targets/FileLogTarget.cs
index 5591c60b..e83b26cd 100644
--- a/Ryujinx.Common/Logging/Targets/FileLogTarget.cs
+++ b/Ryujinx.Common/Logging/Targets/FileLogTarget.cs
@@ -30,7 +30,7 @@ namespace Ryujinx.Common.Logging
files[i].Delete();
}
- string version = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
+ string version = ReleaseInformations.GetVersion();
// Get path for the current time
path = Path.Combine(logDir.FullName, $"Ryujinx_{version}_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.log");
diff --git a/Ryujinx.Common/ReleaseInformations.cs b/Ryujinx.Common/ReleaseInformations.cs
new file mode 100644
index 00000000..1dcb4bf3
--- /dev/null
+++ b/Ryujinx.Common/ReleaseInformations.cs
@@ -0,0 +1,32 @@
+namespace Ryujinx.Common
+{
+ // DO NOT EDIT, filled by CI
+ public static class ReleaseInformations
+ {
+ public static string BuildVersion = "%%RYUJINX_BUILD_VERSION%%";
+ public static string BuildGitHash = "%%RYUJINX_BUILD_GIT_HASH%%";
+ public static string ReleaseChannelName = "%%RYUJINX_TARGET_RELEASE_CHANNEL_NAME%%";
+ public static string ReleaseChannelOwner = "%%RYUJINX_TARGET_RELEASE_CHANNEL_OWNER%%";
+ public static string ReleaseChannelRepo = "%%RYUJINX_TARGET_RELEASE_CHANNEL_REPO%%";
+
+ public static bool IsValid()
+ {
+ return !BuildGitHash.StartsWith("%%") &&
+ !ReleaseChannelName.StartsWith("%%") &&
+ !ReleaseChannelOwner.StartsWith("%%") &&
+ !ReleaseChannelRepo.StartsWith("%%");
+ }
+
+ public static string GetVersion()
+ {
+ if (IsValid())
+ {
+ return BuildVersion;
+ }
+ else
+ {
+ return "1.0.0-dirty";
+ }
+ }
+ }
+}