forked from BeyondDimension/SteamTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
280 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/Common.CoreLib/Properties/ThisAssembly.DynamicVersion.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
namespace System.Properties | ||
{ | ||
static partial class ThisAssembly | ||
{ | ||
const string alpha = "-alpha"; | ||
const string beta = "-beta"; | ||
|
||
public static string DynamicVersion | ||
{ | ||
get | ||
{ | ||
switch (DI.Platform) | ||
{ | ||
case Platform.Linux: | ||
return Version + alpha; | ||
case Platform.Android: | ||
return Version + beta; | ||
case Platform.Apple: | ||
switch (DI.DeviceIdiom) | ||
{ | ||
case DeviceIdiom.Phone: | ||
break; | ||
case DeviceIdiom.Tablet: | ||
break; | ||
case DeviceIdiom.Desktop: | ||
return Version + beta; | ||
case DeviceIdiom.TV: | ||
break; | ||
case DeviceIdiom.Watch: | ||
break; | ||
} | ||
break; | ||
case Platform.UWP: | ||
break; | ||
} | ||
return Version; | ||
} | ||
} | ||
|
||
#if NETSTANDARD2_1 || NETCOREAPP2_1_OR_GREATER | ||
static readonly Lazy<bool> mIsBetaRelease = new(() => DynamicVersion.Contains(beta, StringComparison.Ordinal)); | ||
public static bool IsBetaRelease => mIsBetaRelease.Value; | ||
|
||
static readonly Lazy<bool> mIsAlphaRelease = new(() => DynamicVersion.Contains(alpha, StringComparison.Ordinal)); | ||
public static bool IsAlphaRelease => mIsAlphaRelease.Value; | ||
|
||
static readonly Lazy<string> mVersionDisplay = new(() => | ||
{ | ||
Version version = new(Version); | ||
return $"{version.ToString(3)}{(IsAlphaRelease ? " α" : (IsBetaRelease ? " β" : ""))}{(version.Revision <= 0 ? "" : " rev." + version.Revision)}"; | ||
}); | ||
public static string VersionDisplay => mVersionDisplay.Value; | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.