Skip to content

Commit 03447c3

Browse files
authored
Prep for branding & baselines (#997)
* Use `$(BUILD_SOURCEVERSION)` to determine SHA - support AzDO CI a bit more directly nit: use CI properties in repo.targets too * Use Ubuntu 18.04 build agents - set locale consistently on all platforms - default locale on newer agents is unloved `C.UTF-8` * Fix failing Tests - use current runtime version in `InstallDotNetTests`
1 parent 18f1ba8 commit 03447c3

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'macOS')) }}:
7777
vmImage: macOS-10.14
7878
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Linux')) }}:
79-
vmImage: ubuntu-16.04
79+
vmImage: ubuntu-18.04
8080
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Windows')) }}:
8181
vmImage: vs2017-win2016
8282
${{ if ne(variables['System.TeamProject'], 'public') }}:
@@ -88,6 +88,9 @@ jobs:
8888
DOTNET_HOME: $(Agent.BuildDirectory)/.dotnet
8989
BuildScriptArgs: ${{ parameters.buildArgs }}
9090
BuildConfiguration: ${{ parameters.configuration }}
91+
LC_ALL: 'en_US.UTF-8'
92+
LANG: 'en_US.UTF-8'
93+
LANGUAGE: 'en_US.UTF-8'
9194
TeamName: AspNetCore
9295
${{ if and(eq(parameters.codeSign, 'true'), eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
9396
_SignType: real

Diff for: build/repo.targets

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
</ItemGroup>
3333

3434
<Target Name="ResolveRepositoryCommit" Condition="'$(RepositoryCommit)'==''" BeforeTargets="Prepare">
35+
<PropertyGroup>
36+
<RepositoryCommit Condition="'$(APPVEYOR_REPO_COMMIT)' != ''">$(APPVEYOR_REPO_COMMIT)</RepositoryCommit>
37+
<RepositoryCommit Condition="'$(BUILD_SOURCEVERSION)' != ''">$(BUILD_SOURCEVERSION)</RepositoryCommit>
38+
<RepositoryCommit Condition="'$(TRAVIS_COMMIT)' != ''">$(TRAVIS_COMMIT)</RepositoryCommit>
39+
<RepositoryCommit Condition="'$(CommitHash)' != ''">$(CommitHash)</RepositoryCommit>
40+
</PropertyGroup>
3541

3642
<GetGitCommitInfo WorkingDirectory="$(RepositoryRoot)"
3743
Condition="'$(RepositoryCommit)' == ''">

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

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<Target Name="ResolveCommitHash" Condition="'$(RepositoryCommit)' == ''">
1616
<PropertyGroup>
1717
<RepositoryCommit Condition="'$(APPVEYOR_REPO_COMMIT)' != ''">$(APPVEYOR_REPO_COMMIT)</RepositoryCommit>
18+
<RepositoryCommit Condition="'$(BUILD_SOURCEVERSION)' != ''">$(BUILD_SOURCEVERSION)</RepositoryCommit>
1819
<RepositoryCommit Condition="'$(TRAVIS_COMMIT)' != ''">$(TRAVIS_COMMIT)</RepositoryCommit>
1920
<RepositoryCommit Condition="'$(CommitHash)' != ''">$(CommitHash)</RepositoryCommit>
2021
</PropertyGroup>

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
</Target>
3636

3737
<Target Name="ResolveCommitHash" Condition="'$(RepositoryCommit)'==''">
38-
3938
<PropertyGroup>
4039
<RepositoryCommit Condition="'$(APPVEYOR_REPO_COMMIT)' != ''">$(APPVEYOR_REPO_COMMIT)</RepositoryCommit>
40+
<RepositoryCommit Condition="'$(BUILD_SOURCEVERSION)' != ''">$(BUILD_SOURCEVERSION)</RepositoryCommit>
4141
<RepositoryCommit Condition="'$(TRAVIS_COMMIT)' != ''">$(TRAVIS_COMMIT)</RepositoryCommit>
4242
<RepositoryCommit Condition="'$(CommitHash)' != ''">$(CommitHash)</RepositoryCommit>
4343
</PropertyGroup>

Diff for: test/KoreBuild.Tasks.Tests/InstallDotNetTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void InstallsDotnetCoreRuntime()
3030
Directory.Delete(path, recursive: true);
3131
}
3232

33-
var request = new TaskItem("1.0.5", new Hashtable
33+
var request = new TaskItem("2.1.26", new Hashtable
3434
{
3535
["Runtime"] = "dotnet",
3636
["InstallDir"] = path
@@ -47,7 +47,7 @@ public void InstallsDotnetCoreRuntime()
4747
InstallScript = script,
4848
};
4949

50-
var expected = Path.Combine(path, "shared", "Microsoft.NETCore.App", "1.0.5", ".version");
50+
var expected = Path.Combine(path, "shared", "Microsoft.NETCore.App", "2.1.26", ".version");
5151
Assert.False(File.Exists(expected), "Test folder should have been deleted");
5252

5353
Assert.True(task.Execute(), "Task should pass");

0 commit comments

Comments
 (0)