@@ -46,16 +46,25 @@ module TemporaryDocumentationHelpers =
4646 FsiEval : bool }
4747
4848
49- let private run toolPath command =
50- if 0 <> Process.execSimple (( fun info ->
51- { info with
52- FileName = toolPath
53- Arguments = command }) >> Process.withFramework) System.TimeSpan.MaxValue
49+ let private run toolPath arguments =
50+ Command.RawCommand
51+ (
52+ toolPath,
53+ arguments
54+ )
55+ |> CreateProcess.fromCommand
56+ |> CreateProcess.withFramework
57+ |> CreateProcess.ensureExitCode
58+ |> Proc.run
59+ |> ignore
5460
55- then failwithf " FSharp.Formatting %s failed." command
5661
5762 let createDocs p =
58- let toolPath = Tools.findToolInSubPath " fsformatting.exe" ( Directory.GetCurrentDirectory() @@ " lib/Formatting" )
63+ let toolPath =
64+ match ProcessUtils.tryFindLocalTool " " " fsformatting.exe" [( Directory.GetCurrentDirectory() @@ " /lib" )] with
65+ | Some tool -> tool
66+ | _ -> failwith " FSFormatting executable not found"
67+ //let toolPath = Tools.findToolInSubPath "fsformatting.exe" (Directory.GetCurrentDirectory() @@ "lib/Formatting")
5968
6069 let defaultLiterateArguments =
6170 { ToolPath = toolPath
@@ -82,10 +91,7 @@ module TemporaryDocumentationHelpers =
8291 |> Seq.append
8392 ([ " literate" ; " --processdirectory" ] @ layoutroots @ [ " --inputdirectory" ; source; " --templatefile" ; template;
8493 " --outputDirectory" ; outputDir] @ fsiEval @ [ " --replacements" ])
85- |> Seq.map ( fun s ->
86- if s.StartsWith " \" " then s
87- else sprintf " \" %s \" " s)
88- |> String.separated " "
94+ |> Arguments.OfArgs
8995 run arguments.ToolPath command
9096 printfn " Successfully generated docs for %s " source
9197
@@ -139,6 +145,8 @@ let gitRaw = Environment.environVarOrDefault "gitRaw" "https://raw.githubusercon
139145
140146let website = " /FSharp.Plotly"
141147
148+ let pkgDir = " pkg"
149+
142150// --------------------------------------------------------------------------------------
143151// END TODO: The rest of the file includes standard build steps
144152// --------------------------------------------------------------------------------------
@@ -243,23 +251,18 @@ Target.create "Build" (fun _ ->
243251Target.create " RunTests" ( fun _ ->
244252 let assemblies = !! testAssemblies
245253
246- let setParams f =
247- match Environment.isWindows with
248- | true ->
249- fun p ->
250- { p with
251- FileName = f}
252- | false ->
253- fun p ->
254- { p with
255- FileName = " mono"
256- Arguments = f }
257254 assemblies
258- |> Seq.map ( fun f ->
259- Process.execSimple ( setParams f) System.TimeSpan.MaxValue
255+ |> Seq.iter ( fun f ->
256+ Command.RawCommand (
257+ f,
258+ Arguments.OfArgs []
259+ )
260+ |> CreateProcess.fromCommand
261+ |> CreateProcess.withFramework
262+ |> CreateProcess.ensureExitCode
263+ |> Proc.run
264+ |> ignore
260265 )
261- |> Seq.reduce (+)
262- |> ( fun i -> if i > 0 then failwith " " )
263266)
264267
265268// --------------------------------------------------------------------------------------
@@ -268,10 +271,11 @@ Target.create "RunTests" (fun _ ->
268271Target.create " NuGet" ( fun _ ->
269272 Paket.pack( fun p ->
270273 { p with
271- OutputPath = " bin"
274+ ToolType = ToolType.CreateLocalTool()
275+ OutputPath = pkgDir
272276 Version = release.NugetVersion
273- ReleaseNotes = String.toLines release.Notes })
274- )
277+ ReleaseNotes = release.Notes |> String.toLines })
278+ )
275279
276280Target.create " PublishNuget" ( fun _ ->
277281 Paket.push( fun p ->
@@ -366,8 +370,8 @@ Target.create "Docs" (fun _ ->
366370 Shell.rename " docsrc/content/release-notes.md" " docsrc/content/RELEASE_NOTES.md"
367371
368372 File.delete " docsrc/content/license.md"
369- Shell.copyFile " docsrc/content/" " LICENSE.txt "
370- Shell.rename " docsrc/content/license.md" " docsrc/content/LICENSE.txt "
373+ Shell.copyFile " docsrc/content/" " LICENSE"
374+ Shell.rename " docsrc/content/license.md" " docsrc/content/LICENSE"
371375
372376
373377 DirectoryInfo.getSubDirectories ( DirectoryInfo.ofPath templates)
0 commit comments