Skip to content

Commit

Permalink
Server build version
Browse files Browse the repository at this point in the history
  • Loading branch information
Zheneq committed Aug 14, 2024
1 parent 098a50d commit 2e709ab
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Assembly-CSharp/BuildVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@ public static class BuildVersion
public const string s_version =
ThisAssembly.Git.BaseVersion.Major + "." +
ThisAssembly.Git.BaseVersion.Minor +
(ThisAssembly.Git.BaseVersion.Patch != "0" ? "." + ThisAssembly.Git.BaseVersion.Patch : "") +
(ThisAssembly.Git.SemVer.DashLabel != "-client" ? ThisAssembly.Git.SemVer.DashLabel : ""
#if SERVER
(ThisAssembly.Git.BaseVersion.Patch != "0" || ThisAssembly.Git.Commits != "0" ? "." + ThisAssembly.Git.BaseVersion.Patch : "") +
(ThisAssembly.Git.Commits != "0" ? "." + ThisAssembly.Git.Commits : "") +
ThisAssembly.Git.SemVer.DashLabel
#else
(ThisAssembly.Git.SemVer.Patch != "0" ? "." + ThisAssembly.Git.SemVer.Patch : "") +
(ThisAssembly.Git.SemVer.DashLabel != "-client" ? ThisAssembly.Git.SemVer.DashLabel : "")
#endif
#if VANILLA
+ "-vanilla"
#endif
);
;

public static int ReleaseNumber => s_releaseNumber;
public static int BuildNumber => s_buildNumber;
Expand Down
12 changes: 12 additions & 0 deletions Assembly-CSharp/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,28 @@
[assembly: AssemblyVersion (
ThisAssembly.Git.BaseVersion.Major + "." +
ThisAssembly.Git.BaseVersion.Minor + "." +
#if SERVER
ThisAssembly.Git.BaseVersion.Patch + "." +
ThisAssembly.Git.Commits
#else
ThisAssembly.Git.SemVer.Patch
#endif
)]

#if SERVER
[assembly: AssemblyFileVersion (
ThisAssembly.Git.BaseVersion.Major + "." +
ThisAssembly.Git.BaseVersion.Minor + "." +
ThisAssembly.Git.BaseVersion.Patch + "." +
ThisAssembly.Git.Commits
)]
#else
[assembly: AssemblyFileVersion (
ThisAssembly.Git.BaseVersion.Major + "." +
ThisAssembly.Git.BaseVersion.Minor + "." +
ThisAssembly.Git.SemVer.Patch
)]
#endif

[assembly: AssemblyInformationalVersion (BuildVersion.s_version)]

Expand Down

0 comments on commit 2e709ab

Please sign in to comment.