Skip to content

Commit

Permalink
Update build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Dec 29, 2023
1 parent e071323 commit 0ab8f38
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
13 changes: 11 additions & 2 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ let semanticVersioning =
</> "net6.0"
</> "SemanticVersioning.dll"

let fcs =
__SOURCE_DIRECTORY__
</> "src"
</> "Fantomas"
</> "bin"
</> "Release"
</> "net6.0"
</> "FSharp.Compiler.Service.dll"

let pushPackage nupkg =
async {
let key = Environment.GetEnvironmentVariable("NUGET_KEY")
Expand Down Expand Up @@ -112,7 +121,7 @@ pipeline "Build" {
[| "DOTNET_ROLL_FORWARD_TO_PRERELEASE", "1"
"DOTNET_ROLL_FORWARD", "LatestMajor" |]
run
$"dotnet fsdocs build --clean --properties Configuration=Release --fscoptions \" -r:{semanticVersioning}\" --eval --strict --nonpublic"
$"dotnet fsdocs build --clean --properties Configuration=Release --fscoptions \" -r:{semanticVersioning} -r:{fcs}\" --eval --strict --nonpublic"
}
runIfOnlySpecified false
}
Expand Down Expand Up @@ -204,7 +213,7 @@ pipeline "Docs" {
[| "DOTNET_ROLL_FORWARD_TO_PRERELEASE", "1"
"DOTNET_ROLL_FORWARD", "LatestMajor" |]
run
$"dotnet fsdocs watch --properties Configuration=Release --fscoptions \" -r:{semanticVersioning}\" --eval --nonpublic"
$"dotnet fsdocs watch --properties Configuration=Release --fscoptions \" -r:{semanticVersioning} -r:{fcs}\" --eval --nonpublic"
}
runIfOnlySpecified true
}
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/end-users/Configuration.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ UI might be available depending on the IDE.
*)

(*** hide ***)
#r "../../../src/Fantomas/bin/Release/net6.0/Fantomas.FCS.dll"
#r "../../../src/Fantomas/bin/Release/net6.0/FSharp.Compiler.Service.dll"
#r "../../../src/Fantomas/bin/Release/net6.0/Fantomas.Core.dll"

printf $"version: {Fantomas.Core.CodeFormatter.GetVersion()}"
Expand Down
6 changes: 2 additions & 4 deletions docs/docs/end-users/GeneratingCode.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ In simple scenarios this can work out, but in the long run it doesn't scale well
To illustrate the API, lets generate a simple value binding: `let a = 0`.
*)

#r "../../../src/Fantomas/bin/Release/net6.0/Fantomas.FCS.dll"
#r "../../../src/Fantomas/bin/Release/net6.0/FSharp.Compiler.Service.dll"
#r "../../../src/Fantomas/bin/Release/net6.0/Fantomas.Core.dll" // In production use #r "nuget: Fantomas.Core, 6.*"

open Fantomas.FCS.Text
open FSharp.Compiler.Text
open Fantomas.Core.SyntaxOak

let implementationSyntaxTree =
Expand Down Expand Up @@ -98,8 +98,6 @@ Example usage:
*)

open Fantomas.FCS

Parse.parseFile false (SourceText.ofString "let a = 1") []
(*** include-it ***)

Expand Down

0 comments on commit 0ab8f38

Please sign in to comment.