Skip to content

Commit

Permalink
help travis by finding path for installed sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyme committed Mar 20, 2019
1 parent ef86374 commit 811fb0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions build.fsx
Expand Up @@ -48,8 +48,8 @@ let installed =
printfn "Desired .NET SDK version = %s" desiredSdkVersion
printfn "DotNetCli.isInstalled() = %b" installed

let installDesiredVersion () =
DotNet.install (fun v -> { v with Version = DotNet.Version desiredSdkVersion }) (DotNet.Options.Create ())
let getPathForSdkVersion (sdkVersion) =
DotNet.install (fun v -> { v with Version = DotNet.Version sdkVersion }) (DotNet.Options.Create ())
|> fun o -> o.DotNetCliPath

if installed then
Expand All @@ -64,10 +64,12 @@ if installed then
printfn "*** You have .NET SDK version '%s' installed, we expect at least version '%s'" installedSdkVersion desiredSdkVersion
| _ ->
printfn "*** The .NET SDK version '%s' will be installed (despite the fact that version '%s' is already installed) because we want precisely that version in CI" desiredSdkVersion installedSdkVersion
sdkPath <- Some (installDesiredVersion ())
sdkPath <- Some (getPathForSdkVersion desiredSdkVersion)
else
sdkPath <- Some (getPathForSdkVersion installedSdkVersion)
else
printfn "*** The .NET SDK version '%s' will be installed (no other version was found by FAKE helpers)" desiredSdkVersion
sdkPath <- Some (installDesiredVersion ())
sdkPath <- Some (getPathForSdkVersion desiredSdkVersion)

// Read release notes & version info from RELEASE_NOTES.md
let release = ReleaseNotes.load "RELEASE_NOTES.md"
Expand Down
2 changes: 1 addition & 1 deletion global.json
@@ -1 +1 @@
{ "sdk": { "version": "2.1.401"} }
{ "sdk": { "version": "2.1.403"} }

0 comments on commit 811fb0a

Please sign in to comment.