GitVersion
GitVersion copied to clipboard
Failing tests for issue #1802
Failing tests for #1802. Closes #1802. Reopen of #1947
I tried looking at this, but the code inside AssemblyInfoFileUpdaterReplaceOrInsertAfterLastAssemblyAttributeOrAppend
is quite convoluted. I would recommending splitting up a bit. It's easy to create a regex that does not match if a line is commented out, using a negative lookahead, e.g:
^(?!\/\/).*AssemblyVersion\s*\(.*\)\s*
however, it looks as if we try to replace in the whole AssemblyVersion.{vb,cs,fs}
in one bit method. I would recommend just looping the file a line at a time, and replacing (skipping the commented lines), and register which of them we have replaced in the loop. And then, afterwards, we could add the ones we have not replaced (if desired). I can take another look at it, but I would recommend rewriting the logic a bit.
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.