ReleaseInformations.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. namespace Ryujinx.Common
  2. {
  3. // DO NOT EDIT, filled by CI
  4. public static class ReleaseInformations
  5. {
  6. public static string BuildVersion = "%%RYUJINX_BUILD_VERSION%%";
  7. public static string BuildGitHash = "%%RYUJINX_BUILD_GIT_HASH%%";
  8. public static string ReleaseChannelName = "%%RYUJINX_TARGET_RELEASE_CHANNEL_NAME%%";
  9. public static string ReleaseChannelOwner = "%%RYUJINX_TARGET_RELEASE_CHANNEL_OWNER%%";
  10. public static string ReleaseChannelRepo = "%%RYUJINX_TARGET_RELEASE_CHANNEL_REPO%%";
  11. public static bool IsValid()
  12. {
  13. return !BuildGitHash.StartsWith("%%") &&
  14. !ReleaseChannelName.StartsWith("%%") &&
  15. !ReleaseChannelOwner.StartsWith("%%") &&
  16. !ReleaseChannelRepo.StartsWith("%%");
  17. }
  18. public static string GetVersion()
  19. {
  20. if (IsValid())
  21. {
  22. return BuildVersion;
  23. }
  24. else
  25. {
  26. return "1.0.0-dirty";
  27. }
  28. }
  29. }
  30. }