Skip to content

Commit dd7e12f

Browse files
committed
Merge branch 'release/0.12.0'
2 parents 9eb62ae + 25c78bc commit dd7e12f

File tree

9 files changed

+69
-55
lines changed

9 files changed

+69
-55
lines changed

.appveyor.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
image:
77
- Visual Studio 2022
88

9-
install:
10-
- ps: dotnet --info
11-
129
#---------------------------------#
1310
# Build Script #
1411
#---------------------------------#

build.ps1

Lines changed: 58 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,86 @@
11
#!/usr/bin/env pwsh
2-
$ErrorActionPreference = 'Stop'
32
$DotNetInstallerUri = 'https://dot.net/v1/dotnet-install.ps1';
43
$DotNetUnixInstallerUri = 'https://dot.net/v1/dotnet-install.sh'
5-
$DotNetChannel = 'LTS'
64
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
75

8-
[string] $DotNetVersion = '6.0.100'
6+
# Make sure tools folder exists
7+
$ToolPath = Join-Path $PSScriptRoot "tools"
8+
if (!(Test-Path $ToolPath)) {
9+
Write-Verbose "Creating tools directory..."
10+
New-Item -Path $ToolPath -Type Directory -Force | out-null
11+
}
12+
13+
14+
if ($PSVersionTable.PSEdition -ne 'Core') {
15+
# Attempt to set highest encryption available for SecurityProtocol.
16+
# PowerShell will not set this by default (until maybe .NET 4.6.x). This
17+
# will typically produce a message for PowerShell v2 (just an info
18+
# message though)
19+
try {
20+
# Set TLS 1.2 (3072), then TLS 1.1 (768), then TLS 1.0 (192), finally SSL 3.0 (48)
21+
# Use integers because the enumeration values for TLS 1.2 and TLS 1.1 won't
22+
# exist in .NET 4.0, even though they are addressable if .NET 4.5+ is
23+
# installed (.NET 4.5 is an in-place upgrade).
24+
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48
25+
} catch {
26+
Write-Output 'Unable to set PowerShell to use TLS 1.2 and TLS 1.1 due to old .NET Framework installed. If you see underlying connection closed or trust errors, you may need to upgrade to .NET Framework 4.5+ and PowerShell v3'
27+
}
28+
}
929

1030
###########################################################################
1131
# INSTALL .NET CORE CLI
1232
###########################################################################
1333

14-
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
15-
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
16-
$env:DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX = 2
17-
18-
Function Remove-PathVariable([string]$VariableToRemove) {
19-
$SplitChar = ';'
20-
if ($IsMacOS -or $IsLinux) {
21-
$SplitChar = ':'
22-
}
23-
24-
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
25-
if ($path -ne $null) {
26-
$newItems = $path.Split($SplitChar, [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
27-
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join($SplitChar, $newItems), "User")
28-
}
29-
30-
$path = [Environment]::GetEnvironmentVariable("PATH", "Process")
31-
if ($path -ne $null) {
32-
$newItems = $path.Split($SplitChar, [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
33-
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join($SplitChar, $newItems), "Process")
34-
}
34+
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
35+
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
36+
$env:DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2
37+
38+
39+
Function Remove-PathVariable([string]$VariableToRemove)
40+
{
41+
$SplitChar = ';'
42+
if ($IsMacOS -or $IsLinux) {
43+
$SplitChar = ':'
44+
}
45+
46+
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
47+
if ($path -ne $null)
48+
{
49+
$newItems = $path.Split($SplitChar, [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
50+
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join($SplitChar, $newItems), "User")
51+
}
52+
53+
$path = [Environment]::GetEnvironmentVariable("PATH", "Process")
54+
if ($path -ne $null)
55+
{
56+
$newItems = $path.Split($SplitChar, [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
57+
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join($SplitChar, $newItems), "Process")
58+
}
3559
}
3660

37-
# Get .NET Core CLI path if installed.
38-
$FoundDotNetCliVersion = $null;
39-
if (Get-Command dotnet -ErrorAction SilentlyContinue) {
40-
$FoundDotNetCliVersion = dotnet --version;
41-
}
42-
43-
if ($FoundDotNetCliVersion -ne $DotNetVersion) {
44-
$InstallPath = Join-Path $PSScriptRoot ".dotnet"
45-
if (!(Test-Path $InstallPath)) {
61+
$InstallPath = Join-Path $PSScriptRoot ".dotnet"
62+
$GlobalJsonPath = Join-Path $PSScriptRoot "global.json"
63+
if (!(Test-Path $InstallPath)) {
4664
New-Item -Path $InstallPath -ItemType Directory -Force | Out-Null;
47-
}
65+
}
4866

49-
if ($IsMacOS -or $IsLinux) {
67+
if ($IsMacOS -or $IsLinux) {
5068
$ScriptPath = Join-Path $InstallPath 'dotnet-install.sh'
5169
(New-Object System.Net.WebClient).DownloadFile($DotNetUnixInstallerUri, $ScriptPath);
52-
& bash $ScriptPath --version "$DotNetVersion" --install-dir "$InstallPath" --channel "$DotNetChannel" --no-path
70+
& bash $ScriptPath --jsonfile "$GlobalJsonPath" --install-dir "$InstallPath" --no-path
5371

5472
Remove-PathVariable "$InstallPath"
5573
$env:PATH = "$($InstallPath):$env:PATH"
56-
}
57-
else {
74+
}
75+
else {
5876
$ScriptPath = Join-Path $InstallPath 'dotnet-install.ps1'
5977
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri, $ScriptPath);
60-
& $ScriptPath -Channel $DotNetChannel -Version $DotNetVersion -InstallDir $InstallPath;
78+
& $ScriptPath -JSonFile $GlobalJsonPath -InstallDir $InstallPath;
6179

6280
Remove-PathVariable "$InstallPath"
6381
$env:PATH = "$InstallPath;$env:PATH"
64-
}
65-
$env:DOTNET_ROOT = $InstallPath
6682
}
83+
$env:DOTNET_ROOT=$InstallPath
6784

6885
###########################################################################
6986
# RUN BUILD SCRIPT

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Define varibles
44
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5-
DOTNET_VERSION="6.0.100"
5+
DOTNET_VERSION="6.0.402"
66

77
###########################################################################
88
# INSTALL .NET CORE CLI

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "6.0.100",
3+
"version": "6.0.402",
44
"rollForward": "latestFeature"
55
}
66
}

src/Cake.Bakery/Cake.Bakery.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<InternalsVisibleTo Include="Cake.Bakery.Tests" />
1616
</ItemGroup>
1717
<ItemGroup>
18-
<PackageReference Include="Cake.Core" Version="2.2.0" />
19-
<PackageReference Include="Cake.NuGet" Version="2.2.0" />
18+
<PackageReference Include="Cake.Core" Version="2.3.0" />
19+
<PackageReference Include="Cake.NuGet" Version="2.3.0" />
2020
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
2121
</ItemGroup>
2222
<ItemGroup>

src/Cake.Scripting.Tests/Cake.Scripting.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@
107107
</ItemGroup>
108108

109109
<ItemGroup>
110-
<PackageReference Include="Cake.Core" Version="2.2.0" />
111-
<PackageReference Include="Cake.Testing" Version="2.2.0" />
110+
<PackageReference Include="Cake.Core" Version="2.3.0" />
111+
<PackageReference Include="Cake.Testing" Version="2.3.0" />
112112
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
113113
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
114114
<PackageReference Include="xunit" Version="2.4.1" />

src/Cake.Scripting.Transport/Cake.Scripting.Transport.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</ItemGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
24+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.2" />
2525
</ItemGroup>
2626

2727
<ItemGroup>

src/Cake.Scripting/Cake.Scripting.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<InternalsVisibleTo Include="Cake.Scripting.Tests" />
1313
</ItemGroup>
1414
<ItemGroup>
15-
<PackageReference Include="Cake.Core" Version="2.2.0" />
16-
<PackageReference Include="Cake.Common" Version="2.2.0" />
15+
<PackageReference Include="Cake.Core" Version="2.3.0" />
16+
<PackageReference Include="Cake.Common" Version="2.3.0" />
1717
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
18-
<PackageReference Include="Basic.Reference.Assemblies.Net60" Version="1.2.4" />
18+
<PackageReference Include="Basic.Reference.Assemblies.Net60" Version="1.3.0" />
1919
</ItemGroup>
2020
<ItemGroup>
2121
<ProjectReference Include="..\Cake.Scripting.Abstractions\Cake.Scripting.Abstractions.csproj" />

src/Shared.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<None Include="$(MSBuildThisFileDirectory)../LICENSE" Pack="true" PackagePath="$(PackageLicenseFile)"/>
2323
<None Include="$(MSBuildThisFileDirectory)../nuspec/cake-medium.png" Pack="true" PackagePath=""/>
2424

25-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
25+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3">
2626
<PrivateAssets>all</PrivateAssets>
2727
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
2828
</PackageReference>

0 commit comments

Comments
 (0)