File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed
Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,37 @@ To use GmodNET.VersionTool.MSBuild one just should reference corresponding NuGet
6666## GmodNET.VersionTool.SourceGenerator
6767
6868GmodNET.VersionTool.SourceGenerator package contains C# Source Generator,
69- which generates a ` GmodNET.VersionTool.Info.cs ` file, which contains build version data.
69+ which generates a ` GmodNET.VersionTool.Info.cs ` file, which contains build version data:
70+
71+ ``` csharp
72+ using System ;
73+
74+ namespace GmodNET .VersionTool .Info
75+ {
76+ internal static class BuildInfo
77+ {
78+ /// <summary >
79+ /// Gets a full version with build metadata.
80+ /// </summary >
81+ public static string FullVersion => " 3.4.5-beta.2.60030416.main+head.main.commit.e0c1ad9f485ea34ea5ad640d60487ec46e238c44" ;
82+
83+ /// <summary >
84+ /// Gets a version without build metadata.
85+ /// </summary >
86+ public static string VersionWithoutBuildData => " 3.4.5-beta.2.60030416.main" ;
87+
88+ /// <summary >
89+ /// Gets build's commit git repository HEAD name in human-readable format.
90+ /// </summary >
91+ public static string BranchName => " main" ;
92+
93+ /// <summary >
94+ /// Gets build's commit hash as a hex string.
95+ /// </summary >
96+ public static string CommitHash => " e0c1ad9f485ea34ea5ad640d60487ec46e238c44" ;
97+ }
98+ }
99+ ```
70100
71101Path to version file is specified via ` VersionFile ` MSBuild Item,
72102just like with GmodNET.VersionTool.MSBuild.
Original file line number Diff line number Diff line change 11{
2- "Version" : " 2.1.0-alpha .1"
2+ "Version" : " 2.1.0-rc .1"
33}
You can’t perform that action at this time.
0 commit comments