Skip to content

Commit

Permalink
(cake-archiveGH-84) Create build.config file
Browse files Browse the repository at this point in the history
To pin to a specific version of dotnet
  • Loading branch information
gep13 committed Jun 28, 2020
1 parent 1bc6d82 commit c9ec2c6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions build.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
DOTNET_VERSION=3.1.301
14 changes: 13 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,19 @@ Param(
[string[]]$ScriptArgs
)

$DotNetVersion = "3.1.301";
[string] $DotNetVersion= ''
foreach($line in Get-Content (Join-Path $PSScriptRoot 'build.config'))
{
if ($line -like 'DOTNET_VERSION=*') {
$DotNetVersion =$line.SubString(15)
}
}

if ([string]::IsNullOrEmpty($DotNetVersion)) {
'Failed to parse .NET Core SDK Version'
exit 1
}

$DotNetInstallerUri = "https://dot.net/v1/dotnet-install.ps1";

# Make sure tools folder exists
Expand Down

0 comments on commit c9ec2c6

Please sign in to comment.