-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Show the VMR commit hash in dotnet --info #99482
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,9 +74,13 @@ | |
| <CMakeBuildDir>$(IntermediateOutputRootPath)corehost\cmake\</CMakeBuildDir> | ||
| <BuildScript>$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)', 'build.sh'))</BuildScript> | ||
|
|
||
| <CommitHash Condition="('$(CommitHash)' == '') and ('$(DotNetGitCommitHash)' != '')">$(DotNetGitCommitHash)</CommitHash> | ||
| <CommitHash Condition="('$(CommitHash)' == '') and ('$(SourcerevisionId)' != '')">$(SourceRevisionId)</CommitHash> | ||
| <CommitHash Condition="'$(CommitHash)' == ''">N/A</CommitHash> | ||
|
|
||
| <_CoreHostUnixTargetOS>$(TargetOS)</_CoreHostUnixTargetOS> | ||
| <_CoreHostUnixTargetOS Condition="'$(TargetsLinuxBionic)' == 'true'">linux-bionic</_CoreHostUnixTargetOS> | ||
| <BuildArgs>$(Configuration) $(TargetArchitecture) -commithash "$([MSBuild]::ValueOrDefault('$(SourceRevisionId)', 'N/A'))" -os $(_CoreHostUnixTargetOS)</BuildArgs> | ||
| <BuildArgs>$(Configuration) $(TargetArchitecture) -commithash "$(CommitHash)" -os $(_CoreHostUnixTargetOS)</BuildArgs> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is another use of SourcerevisionId at later in this file: https://github.com/dotnet/runtime/pull/99482/files#diff-165e4dabf2097f79d2ed18244f5a9762cfc4fe25a69f9be5e8585f61fc871523R146 . Should it get the same treatment? Would it be better to set SourcerevisionId globally?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think it should. It does the same thing as this, except for Windows, right? I think we want the Unified Behaviour to be the same: show VMR hash with
Probably not. That's used by sourcelink, which we prefer to point to the indvidual repos (though I am not sure why). @NikolaMilosavljevic , any thoughts?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, same thing, except for Windows. Agree it should have the same behaviour. |
||
| <BuildArgs>$(BuildArgs) -cmakeargs "-DVERSION_FILE_PATH=$(NativeVersionFile)"</BuildArgs> | ||
| <BuildArgs Condition="'$(ConfigureOnly)' == 'true'">$(BuildArgs) -configureonly</BuildArgs> | ||
| <BuildArgs Condition="'$(PortableBuild)' != 'true'">$(BuildArgs) -portablebuild=false</BuildArgs> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I find it easier to read when the property just gets set based on being empty and the order indicates the precedence.