-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preffered Version Scheme #59
Comments
Surely the issue with this is not everyone uses the same versioning method. Unless you mean a user-customisable string rather than a built-in one? |
yeah, but there is always a pattern which is commonly used in community and that pattern would be added as Property for direct usage. One can always construct version using the given information anyway. |
@DragonQ GitInfo.txt can optionally have version scheme for Preferred version scheme also but that would complicate things |
I'm in favor of being explicit and not trying to guess what the "community
favorite format" is.
|
@kzu thats fair, but would it be possible to add this format which gives all necessary info as single Property for easy consumption? Got that scheme from http://www.cazzulino.com/git-info-from-msbuild-and-code.html just before Installation section |
You can add it yourself, it's a one-liner in msbuild as well as c# via a
partial ThisAssembly class you can share across all your projects
|
@kzu thanks. We have adapted gitinfo as standard version manager across all projects and being gitinfo on NUGET and all the enhancements done in single place benefits everyone. If not willing to make this change, its OK as everyone should agree and yeah, i can just copy paste this in every project i use simply not a big deal. |
You wouldn't need to copy paste. You can create it in a single place, as a partial class of ThisAssembly, and include it in every project via a simple Version.cs: partial class ThisAssembly
{
public const string Version = ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + "." + ThisAssembly.Git.Commits + "-" + ThisAssembly.Git.Branch + "+" + ThisAssembly.Git.Commit;
} Directory.Build.targets: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Compile Include="Version.cs" />
</ItemGroup>
</Project> Just place both files in an parent/ancestor folder of all your projects and it will just work. |
Hi,
It would be great if there would be single Property to access preferred version scheme. Following was copied from your article
So, it would be great if this combine information is available in single property.
Thanks
The text was updated successfully, but these errors were encountered: