Skip to content

Commit cafde46

Browse files
Publish Fable.React 5.0.0-alpha-001
1 parent 2b56f82 commit cafde46

File tree

5 files changed

+262
-226
lines changed

5 files changed

+262
-226
lines changed

build.fsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx"
55
#load "paket-files/build/fable-compiler/fake-helpers/Fable.FakeHelpers.fs"
66

7+
open System.IO
78
open Fake
89
open Fable.FakeHelpers
910
open Octokit
@@ -23,13 +24,26 @@ let packages =
2324
"src/Fable.Recharts/Fable.Recharts.fsproj"
2425
]
2526

26-
let dotnetcliVersion = "2.1.402"
27+
let addToPath newPath =
28+
let path = environVarOrDefault "PATH" ""
29+
let separator = if isWindows then ";" else ":"
30+
setEnvironVar "PATH" (newPath + separator + path)
31+
2732
let mutable dotnetExePath = environVarOrDefault "DOTNET" "dotnet"
33+
let installDotnetSdk () =
34+
let dotnetcliVersion =
35+
Path.Combine(__SOURCE_DIRECTORY__, "global.json")
36+
|> findLineAndGetGroupValue "\"version\": \"(.*?)\"" 1
37+
38+
dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion
39+
if Path.IsPathRooted(dotnetExePath) then
40+
Path.GetDirectoryName(dotnetExePath) |> addToPath
41+
run __SOURCE_DIRECTORY__ dotnetExePath "--version"
2842

2943
// Clean and install dotnet SDK
3044
Target "Bootstrap" (fun () ->
3145
!! "src/**/bin" ++ "src/**/obj" |> CleanDirs
32-
dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion
46+
installDotnetSdk ()
3347
)
3448

3549
Target "PublishPackages" (fun () ->

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "2.1.402"
3+
"version": "2.1.403"
44
}
55
}

0 commit comments

Comments
 (0)