Skip to content

Commit 040dfa8

Browse files
authored
[release/2.1] Remove $(CommitHash) settings (#1010)
- part 1/2 for dotnet/aspnetcore#41290 - allow `$(CommitHash)` to set `$(RepositoryCommit)` but that's it - seemingly duplicate properties aren't adding value - `$(CommitHash)` was not set correctly in many cases anyhow - don't use `windows-latest` - missing reference assemblies for .NET 4.6.1 nits: - use a VS2019 agent in internal builds too - use `...svc` demand because release/2.1 is for servicing only
1 parent 57612bd commit 040dfa8

File tree

4 files changed

+5
-15
lines changed

4 files changed

+5
-15
lines changed

Diff for: .azure/templates/jobs/default-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ jobs:
7878
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Linux')) }}:
7979
vmImage: ubuntu-18.04
8080
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Windows')) }}:
81-
vmImage: windows-latest
81+
vmImage: windows-2019
8282
${{ if ne(variables['System.TeamProject'], 'public') }}:
8383
name: NetCore1ESPool-Svc-Internal
84-
demands: ImageOverride -equals Build.Windows.10.Amd64.VS2017
84+
demands: ImageOverride -equals Build.Windows.10.Amd64.VS2019.svc
8585
variables:
8686
AgentOsName: ${{ parameters.agentOs }}
8787
ASPNETCORE_TEST_LOG_MAXPATH: "200" # Keep test log file name length low enough for artifact zipping

Diff for: build/repo.targets

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<RepositoryCommit Condition="'$(APPVEYOR_REPO_COMMIT)' != ''">$(APPVEYOR_REPO_COMMIT)</RepositoryCommit>
3737
<RepositoryCommit Condition="'$(BUILD_SOURCEVERSION)' != ''">$(BUILD_SOURCEVERSION)</RepositoryCommit>
3838
<RepositoryCommit Condition="'$(TRAVIS_COMMIT)' != ''">$(TRAVIS_COMMIT)</RepositoryCommit>
39+
<!-- Read from CommitHash but note CommitHash is no longer _set_ or otherwise used in this repo. -->
3940
<RepositoryCommit Condition="'$(CommitHash)' != ''">$(CommitHash)</RepositoryCommit>
4041
</PropertyGroup>
4142

Diff for: modules/BuildTools.Tasks/module.targets

+1-7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<RepositoryCommit Condition="'$(APPVEYOR_REPO_COMMIT)' != ''">$(APPVEYOR_REPO_COMMIT)</RepositoryCommit>
1818
<RepositoryCommit Condition="'$(BUILD_SOURCEVERSION)' != ''">$(BUILD_SOURCEVERSION)</RepositoryCommit>
1919
<RepositoryCommit Condition="'$(TRAVIS_COMMIT)' != ''">$(TRAVIS_COMMIT)</RepositoryCommit>
20+
<!-- Read from CommitHash but note CommitHash is no longer _set_ or otherwise used in this repo. -->
2021
<RepositoryCommit Condition="'$(CommitHash)' != ''">$(CommitHash)</RepositoryCommit>
2122
</PropertyGroup>
2223

@@ -27,13 +28,6 @@
2728
</GetGitCommitHash>
2829

2930
<PropertyGroup>
30-
<!--
31-
RepositoryCommit should be the same as CommitHash.
32-
We use CommitHash for backwards compatibility with build scripts.
33-
Setting RepositoryCommit enables NuGet features added in NuGet/NuGet.Client#2036.
34-
-->
35-
<CommitHash>$(RepositoryCommit)</CommitHash>
36-
<BuildProperties Condition="'$(RepositoryCommit)' != ''">$(BuildProperties);CommitHash=$(RepositoryCommit)</BuildProperties>
3731
<BuildProperties Condition="'$(RepositoryCommit)' != ''">$(BuildProperties);RepositoryCommit=$(RepositoryCommit)</BuildProperties>
3832
</PropertyGroup>
3933
</Target>

Diff for: src/Internal.AspNetCore.Sdk/build/Git.targets

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project>
22

33
<PropertyGroup>
4-
<CommitHash Condition="'$(RepositoryCommit)' == ''">$(RepositoryCommit)</CommitHash>
54
<GenerateCommitHashAttribute Condition="'$(GenerateCommitHashAttribute)'==''">true</GenerateCommitHashAttribute>
65
<GeneratedCommitHashAttributeFile Condition="'$(GeneratedCommitHashAttributeFile)'==''">$(IntermediateOutputPath)$(AssemblyName).CommitHash$(DefaultLanguageSourceExtension)</GeneratedCommitHashAttributeFile>
76
<SourceLinkDestination Condition="'$(SourceLinkDestination)' == ''">$(IntermediateOutputPath)sourcelink.json</SourceLinkDestination>
@@ -39,6 +38,7 @@
3938
<RepositoryCommit Condition="'$(APPVEYOR_REPO_COMMIT)' != ''">$(APPVEYOR_REPO_COMMIT)</RepositoryCommit>
4039
<RepositoryCommit Condition="'$(BUILD_SOURCEVERSION)' != ''">$(BUILD_SOURCEVERSION)</RepositoryCommit>
4140
<RepositoryCommit Condition="'$(TRAVIS_COMMIT)' != ''">$(TRAVIS_COMMIT)</RepositoryCommit>
41+
<!-- Read from CommitHash but note CommitHash is no longer _set_ or otherwise used in this repo. -->
4242
<RepositoryCommit Condition="'$(CommitHash)' != ''">$(CommitHash)</RepositoryCommit>
4343
</PropertyGroup>
4444

@@ -47,11 +47,6 @@
4747
ContinueOnError="WarnAndContinue">
4848
<Output TaskParameter="CommitHash" PropertyName="RepositoryCommit" />
4949
</Sdk_GetGitCommitHash>
50-
51-
<PropertyGroup>
52-
<!-- Set both CommitHash and RepositoryCommit. CommitHash was the property we started using at first. RepositoryCommit was introduced when NuGet started adding this to nuspec. -->
53-
<CommitHash>$(RepositoryCommit)</CommitHash>
54-
</PropertyGroup>
5550
</Target>
5651

5752
<Target Name="CreateSourceLink"

0 commit comments

Comments
 (0)