-
Notifications
You must be signed in to change notification settings - Fork 64
[build] Use GitInfo to Generate Version information. #875
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eeb44c7 to
2c2fe9a
Compare
jonpryor
reviewed
Aug 27, 2021
jonpryor
reviewed
Aug 27, 2021
jonpryor
reviewed
Aug 27, 2021
jonpryor
reviewed
Aug 27, 2021
jonpryor
reviewed
Aug 27, 2021
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Aug 27, 2021
Context: dotnet/java-interop#875 Does It Build™?
Contributor
|
xamarin-android PR: dotnet/android#6241 |
Contributor
|
Not sure if related, but Windows failed to build: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=5141732&view=logs&jobId=cac0e8d3-0ef5-5d2b-b57e-e8fde7204df3&j=cac0e8d3-0ef5-5d2b-b57e-e8fde7204df3&t=d0eaacf3-179f-5217-7519-cd03bc45e5e4 |
Member
|
I think the actual error is: |
jonpryor
reviewed
Sep 7, 2021
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jpobst
pushed a commit
that referenced
this pull request
Sep 30, 2021
Context: d16b1e5 Context: b7982e4 Our previous attempt to use the [`GitInfo`][0] [NuGet Package][1] to generate Version information in commit d16b1e5 did not go as planned. It turns out that old-style projects do NOT support the `$(GenerateAssemblyInfo)` MSBuild property. As such the version information is never generated. As a result when we built the Xamarin.Android version of `Java.Interop` it never includes version information, which results in errors such as: error CS1705: Assembly 'Xamarin.Forms.Platform.Android' with identity 'Xamarin.Forms.Platform.Android, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' which has a higher version than referenced assembly 'Java.Interop' with identity 'Java.Interop, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' Additionally, we were generating the version data on EVERY build. It could be optimized by only generating the required data on the first build, or in this case the `make prepare` step. Introduce a system where a `Version.props` file gets generated during the `make prepare` step and then that file is imported into all the sub-projects. We also have a system to make sure that for legacy projects the `$(GenerateAssemblyInfo)` property actually works. [0]: https://github.com/devlooped/GitInfo [1]: https://www.nuget.org/packages/GitInfo/2.1.2
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our previous attempt to use
GitInfoto generate Version information did not go as planned. It turns out that old style projects do NOT support theGenerateAssemblyInfoProperty. As such the version information never gets generated.As a result when we built the Xamarin.Android version of
Java.Interopit never included version information and resulted in errors such as.In addition to this , we were generating the version data on EVERY build. It could be optimised by only generating the required
data on the first build. Or in this case the
Preparestep.This Pr introduces system when a
Version.propsfile gets generated during thePreparestep and then that file isimported into all the sub projects. We also have a system to make sure that for legacy projects the
GenerateAssemblyInfoactually works.