-
Notifications
You must be signed in to change notification settings - Fork 654
Allow configuring AssemblyInformationalVersion contents #368
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
Comments
Great idea!
|
+1 |
Maybe this link can be of use: https://mhusseini.wordpress.com/2014/05/03/fast-named-formats-in-c/ I've made a quick example to test it which you can see below. The only thing I had to change was the Regex pattern, but then it also works great.
Example:
All parameters are converted to lowercase so it does not matter how you write them. If a member of SemanticVersion doesn't exist then an ArgumentException is thrown, which of course has to be caught further up the stack. The 4 Debug lines above then produces the following output:
Pretty cool don't you think? 😃 |
Did you want to submit a pull request which sorts this issue? The only thing to consider is we want to raise an error if there are any interpolated values which do not exist. For instance |
Well, I didn't plan to just yet @JakeGinnivan I only recently found GitVersion and I don't feel I know the code in depth, so I don't know how to implement this feature without messing something else up. Not yet at least as I still have to investigate a bit more. I just wanted to throw in my example/idea as a part of the solution and hear what people think. |
Closed via #660 |
Add a new branch configuration option
assembly-informational-version-format
which supports string interpolated values from variables.For example
{majorMinorPatch}.branch.{branch}
would use the Branch and MajorMinorPatch variables from the variable provider to create the informational version. This way if you are using ClickOnce (which expects that attribute to contain a valid version) you can override itThe text was updated successfully, but these errors were encountered: