-
Notifications
You must be signed in to change notification settings - Fork 654
re #630 - optionally allows /updateassemblyinfofilename to be generated #631
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
Conversation
… generated Adds argument /ensureassemblyinfo, when specified and /updateassemblyinfofilename is specified and does not exist we will generate a template of the assembly info file containing only *Version attributes in either cs, fs, vb allowing the version values to be replaced
@JakeGinnivan what are your thoughts on this one? Personally I was thinking that this would GitVersion away from it's core functionality. |
Yeah unsure about it. It only supports adding an assemblyInfo file in the root of the repo which is probably too limiting. I also don't like the idea of a file missing until you run GitVersion in your repo. Any reason the Task doesn't work for you, because it has this functionality because it is inside the MSBuild pipeline? |
The primary reason for not considering the MSBuild task is a lack of support for dynamic repositories, could this be implemented, perhaps by adding repo url, branch and commit id to the build pipeline somehow? Coming from a rake build background I'm not a fan of modifying msbuild xml as it tends is likely to lead to confusion within the team as it is less transparent than an "external" build script/process. The specific implementation would solve a specific issue we have with our build process and using GitVersion, that we would have to commit a file to the repo that we have historically always avoided adding as it is auto-generated from our build scripts (rake). I'm happy to discuss further, either make refinements or consider looking at implementing dynamic repositories within the MSBuild task assuming there are no blocking issues with doing so. |
@JakeGinnivan, I have tried the GitVersionTask as suggested, and while it stamps the version on the assemblies as I would need am I still left with 2 issues.
A very typical case for using GitVersion is for library packages or mini frameworks (one of my core reasons for wanting to use it to manage versioning across a team), it is important for us to be able to generate symbols packages for debugging. Relying on something like dotPeek would be an alternative but I wouldnt want to have to dependent on an external tool. In the worst case I can live without symbols, based on @SimonCropp reasons. I can appreciate not wanting to pollute GitVersionExe with an answer to every problem, however this is really just an extension to the existing /updateassemblyinfo task. At the moment if you specify /updateassemblyinfo file_that_doesnt_exist.cs then the fallback is to search for AssemblyInfo.cs files and just update them, I would argue this is not the correct fallback as the user has specifically requested that an individual file be updated, if that file doesnt exist then either an error is thrown or nothing is updated. |
Yeah completely understand. I think it's fine we bring this in, the issue is it doesn't quite fit in with what we have now:
I think maybe it should be a config setting:
Then we change gitversion to append those to the files found by the scan and then it should always create them if they do not exist. Thoughts? |
@JakeGinnivan, I agree about I'll take a look at adding to the config options for specifying these as additional assembly info files. |
I have tested The config can be done later |
Do you want me to create a new issue to track this? |
@JakeGinnivan, I will try and get some time in the next few days to update this |
Adds argument /ensureassemblyinfo, when specified and /updateassemblyinfofilename is specified and does not exist we will generate a template of the assembly info file containing only *Version
attributes in either cs, fs, vb allowing the version values to be replaced.