Skip to content

Commit 6b1c177

Browse files
committed
(cake) update to cake 0.34.1
1 parent a598ff5 commit 6b1c177

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

build.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
2-
CAKE_VERSION=0.34.0
2+
CAKE_VERSION=0.34.1
33
DOTNET_VERSION=2.2.107

build.ps1

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
5252

5353
[string] $CakeVersion = ''
5454
[string] $DotNetVersion= ''
55-
foreach($line in Get-Content "$PSScriptRoot\build.config")
55+
foreach($line in Get-Content (Join-Path $PSScriptRoot 'build.config'))
5656
{
5757
if ($line -like 'CAKE_VERSION=*') {
5858
$CakeVersion = $line.SubString(13)
@@ -117,16 +117,21 @@ if($FoundDotNetCliVersion -ne $DotNetVersion) {
117117
}
118118

119119
if ($IsMacOS -or $IsLinux) {
120-
(New-Object System.Net.WebClient).DownloadFile($DotNetUnixInstallerUri, "$InstallPath\dotnet-install.sh");
121-
& bash $InstallPath\dotnet-install.sh --version "$DotNetVersion" --install-dir "$InstallPath" --channel "$DotNetChannel" --no-path
120+
$ScriptPath = Join-Path $InstallPath 'dotnet-install.sh'
121+
(New-Object System.Net.WebClient).DownloadFile($DotNetUnixInstallerUri, $ScriptPath);
122+
& bash $ScriptPath --version "$DotNetVersion" --install-dir "$InstallPath" --channel "$DotNetChannel" --no-path
123+
Remove-PathVariable "$InstallPath"
124+
$env:PATH = "$($InstallPath):$env:PATH"
122125
}
123126
else {
124-
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri, "$InstallPath\dotnet-install.ps1");
125-
& $InstallPath\dotnet-install.ps1 -Channel $DotNetChannel -Version $DotNetVersion -InstallDir $InstallPath;
126-
}
127+
$ScriptPath = Join-Path $InstallPath 'dotnet-install.ps1'
128+
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri, $ScriptPath);
129+
& $ScriptPath -Channel $DotNetChannel -Version $DotNetVersion -InstallDir $InstallPath;
127130

128131
Remove-PathVariable "$InstallPath"
129132
$env:PATH = "$InstallPath;$env:PATH"
133+
}
134+
$env:DOTNET_ROOT=$InstallPath
130135
}
131136

132137
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
@@ -146,7 +151,8 @@ if ($CakeInstalledVersion -eq $CakeVersion) {
146151
$CakeExePath = (Get-Command dotnet-cake).Source
147152
}
148153
else {
149-
$CakePath = Join-Path $ToolPath ".store\cake.tool\$CakeVersion"
154+
$CakePath = [System.IO.Path]::Combine($ToolPath, '.store', 'cake.tool', $CakeVersion) # Old PowerShell versions Join-Path only supports one child path
155+
150156
$CakeExePath = (Get-ChildItem -Path $ToolPath -Filter "dotnet-cake*" -File| ForEach-Object FullName | Select-Object -First 1)
151157

152158

@@ -168,7 +174,7 @@ else {
168174
}
169175

170176
# ###########################################################################
171-
# # RUN BUILD SCRIPT
177+
# RUN BUILD SCRIPT
172178
# ###########################################################################
173179

174180
# Build the argument list.

0 commit comments

Comments
 (0)