Skip to content

Add version info if it does not exist #714

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

Merged
merged 1 commit into from
Jan 10, 2016
Merged

Add version info if it does not exist #714

merged 1 commit into from
Jan 10, 2016

Conversation

FunnyFry
Copy link
Contributor

This pull request addresses issues #473 and #474. Both of these, along with the associated pull request to #473, don't seem to have received any traction since July.

I am using the GitVersion VSO build task and having this issue addressed allows us to not think about what the version info in the AssemblyInfo.cs files look like. Previously all of our projects had been using the GitVersionTask and no longer have the version info in them. I would prefer to not go back and add them and just continue forward using the VSO build task.

@JakeGinnivan

@pascalberger
Copy link
Member

@JakeGinnivan Do you still prefer to have this logic in core (as written in #474). Otherwise this LGTM.

@asbjornu
Copy link
Member

I already think the code is already fragmented enough between Task and exe; I would at least love it if more code was lifted into Core so testing was easier and reuse greater.

@JakeGinnivan
Copy link
Contributor

@FunnyFry what do you think, do you think that this could be moved into core so Task and Exe share the same update assembly info logic? This looks like a good step towards that, but if we could move entirely into core that would be an awesome win.

If you don't think it's possible or you don't have time, let us know and we will merge as this is a good first step

@JakeGinnivan
Copy link
Contributor

@FunnyFry just wondering on your thoughts on trying to remove this duplication before I continue.

JakeGinnivan added a commit that referenced this pull request Jan 10, 2016
@JakeGinnivan JakeGinnivan merged commit f21c6cf into GitTools:release/4.0.0 Jan 10, 2016
@csmager
Copy link

csmager commented Apr 26, 2016

This is included in the 3.5.0 release and broke my build on AppVeyor. I have a couple of legacy projects referenced that reference a 'shared' AssemblyInfoCommon.cs file that contains the attributes

I appreciate that in the previous releases, this meant this files actually never had their version numbers updated by GitVersion... but by adding them into the one it did find, it created duplicate attributes.

I'm not sure if this should be logged as an issue (as it didn't actually work as you'd expect before, either), but thought I'd mention!

@JakeGinnivan
Copy link
Contributor

@csmager ill leave opening an issue to you, we probably can add some release notes or something about a possible breaking change?

You can now also specify the assembly info filename. Try /updateassemblyinfo AssemblyInfoCommon.cs
See http://gitversion.readthedocs.org/en/latest/usage/command-line/#inject-version-metadata-into-the-assembly

If this doesn't resolve your issue then open an issue so we can continue discussion options

@csmager
Copy link

csmager commented Apr 26, 2016

I think the only solution to have avoided my problem would be that GitVersion checks a project's .csproj file and then scans all included files for these attributes. I don't think you want to go there. I think I'll leave opening an issue.

I think adding something to the release notes would be useful, I had to do a diff between versions, find the code, and look at the blame to find this PR to see it was deliberate! Perhaps it might save someone else some time.

@JakeGinnivan
Copy link
Contributor

Yeah thanks @csmager

Sometimes breaking changes like that get through, hopefully we can get it sorted soon enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants