Skip to content

Commit 2172fcc

Browse files
committed
Use buildDir variable
1 parent 3d88307 commit 2172fcc

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

build.fsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ let netFrameworks = ["v4.0"; "v4.5"]
3737
// The rest of the code is standard F# build script
3838
// --------------------------------------------------------------------------------------
3939

40+
let buildDir = "bin"
41+
4042
// Read release notes & version info from RELEASE_NOTES.md
4143
let release = LoadReleaseNotes (__SOURCE_DIRECTORY__ + "/RELEASE_NOTES.md")
4244
let isAppVeyorBuild = buildServer = BuildServer.AppVeyor
@@ -66,7 +68,7 @@ Target "AssemblyInfo" (fun _ ->
6668
// Clean build results & restore NuGet packages
6769

6870
Target "Clean" (fun _ ->
69-
CleanDirs ["bin" ]
71+
CleanDirs [ buildDir ]
7072
)
7173

7274
Target "CleanDocs" (fun _ ->
@@ -79,7 +81,7 @@ Target "CleanDocs" (fun _ ->
7981
Target "GenerateFSIStrings" (fun _ ->
8082
// Generate FSIStrings using the FSSrGen tool
8183
execProcess (fun p ->
82-
let dir = __SOURCE_DIRECTORY__ @@ "src/fsharp/fsi"
84+
let dir = __SOURCE_DIRECTORY__ </> "src/fsharp/fsi"
8385
p.Arguments <- "FSIstrings.txt FSIstrings.fs FSIstrings.resx"
8486
p.WorkingDirectory <- dir
8587
p.FileName <- !! "lib/bootstrap/4.0/fssrgen.exe" |> Seq.head ) TimeSpan.MaxValue
@@ -89,7 +91,7 @@ Target "GenerateFSIStrings" (fun _ ->
8991
Target "Build" (fun _ ->
9092
netFrameworks
9193
|> List.iter (fun framework ->
92-
let outputPath = "bin/" + framework
94+
let outputPath = buildDir </> framework
9395
!! (project + ".sln")
9496
|> MSBuild outputPath "Build" ["Configuration","Release"; "TargetFrameworkVersion", framework]
9597
|> Log (".NET " + framework + " Build-Output: "))
@@ -101,7 +103,7 @@ Target "SourceLink" (fun _ ->
101103
#else
102104
netFrameworks
103105
|> List.iter (fun framework ->
104-
let outputPath = __SOURCE_DIRECTORY__ @@ "bin/" + framework
106+
let outputPath = __SOURCE_DIRECTORY__ </> buildDir </> framework
105107
let proj = VsProj.Load "src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj"
106108
["Configuration","Release"; "TargetFrameworkVersion",framework; "OutputPath",outputPath]
107109
let sourceFiles =
@@ -138,15 +140,15 @@ Target "RunTests" (fun _ ->
138140

139141
Target "NuGet" (fun _ ->
140142
NuGet (fun p ->
141-
{ p with
143+
{ p with
142144
Authors = authors
143145
Project = project
144146
Summary = summary
145147
Description = description
146148
Version = buildVersion
147149
ReleaseNotes = release.Notes |> toLines
148150
Tags = tags
149-
OutputPath = "bin"
151+
OutputPath = buildDir
150152
AccessKey = getBuildParamOrDefault "nugetkey" ""
151153
Publish = hasBuildParam "nugetkey" })
152154
("nuget/" + project + ".nuspec")

0 commit comments

Comments
 (0)