Reputation: 686
Given I have some C# and C++ libraries in a GIT repository and I have a "Development" branch from which all feature and bug fix branches are derived.
How can I make it so that when a developer merges their feature/bug-fix branch into "Development" then pushes it (to ensure they have first pulled the latest version information from other developers), they are prompted for each library they have made a change to, to specify how they would like the assembly version incremented for its project (e.g. "What type of change was this? Major, Minor, Build or Revision"). The new version information should then ideally auto-commit prior to the push happening.
I am doing this so that changes cannot be made to an assembly and that assembly released to a customer without the version number having been changed from a previous release. I also want to avoid using the *
syntax in Visual Studio for Build and Revision components so that there are not huge unexplained gaps in the numbers.
If a developer merges their branch into Development than once, I am happy for the version number to change or stay the same.
Specifically the attributes I want to change in the C# assemblies are under AssemblyInfo.cs
and are:
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.0.0.0")]
In C++ it would be the .rc
version file added to the project via Add → Resource → Version → New
.
Upvotes: 1
Views: 343