@@ -39,8 +39,6 @@ let summary = "Asynchronous sequences for F#"
3939
4040let license = " Apache 2.0 License"
4141
42- let buildDir = " bin"
43-
4442// Git configuration (used for publishing documentation in gh-pages branch)
4543// The profile where the project is posted
4644let projectRepo = " https://github.com/fsprojects/FSharp.Control.AsyncSeq"
@@ -53,11 +51,20 @@ let artifactsDir = __SOURCE_DIRECTORY__ @@ "artifacts"
5351// Read additional information from the release notes document
5452let release = ReleaseNotes.load " RELEASE_NOTES.md"
5553
54+
55+ let versionPropsTemplate = $" \
56+ <Project>
57+ <PropertyGroup>
58+ <Version>%s {release.NugetVersion}</Version>
59+ </PropertyGroup>
60+ </Project>"
61+
5662// --------------------------------------------------------------------------------------
5763// Clean build results
5864
5965Target.create " Clean" ( fun _ ->
60- Shell.cleanDirs [ " bin" ; " temp" ]
66+ DotNet.exec id " clean" " " |> ignore
67+ Shell.cleanDirs [ " artifacts" ; " temp" ]
6168)
6269
6370// Generate assembly info files with the right version & up-to-date information
@@ -73,7 +80,6 @@ Target.create "AssemblyInfo" (fun _ ->
7380
7481 AssemblyInfoFile.createFSharp " src/Common/AssemblyInfo.fs" info
7582 AssemblyInfoFile.createCSharp " src/Common/AssemblyInfo.cs" info
76- let releaseNotes = String.toLines release.Notes |> System.Net.WebUtility.HtmlEncode
7783 File.WriteAllText( " version.props" , sprintf """ <Project>
7884 <PropertyGroup>
7985 <Version>%s </Version>
@@ -107,6 +113,8 @@ Target.create "RunTests" (fun _ ->
107113// Build a NuGet package
108114
109115Target.create " NuGet" ( fun _ ->
116+
117+ File.WriteAllText( " version.props" , versionPropsTemplate)
110118 DotNet.pack ( fun pack ->
111119 { pack with
112120 OutputPath = Some artifactsDir
@@ -119,7 +127,7 @@ Target.create "NuGet" (fun _ ->
119127
120128Target.create " GenerateDocs" ( fun _ ->
121129 Shell.cleanDir " .fsdocs"
122- DotNet.exec id " fsdocs" " build --clean" |> ignore
130+ DotNet.exec id " fsdocs" " build --clean --properties Configuration=Release " |> ignore
123131)
124132
125133// --------------------------------------------------------------------------------------
@@ -157,10 +165,14 @@ Target.create "All" ignore
157165" Clean"
158166 ==> " Build"
159167 ==> " RunTests"
160- ==> " All"
161168 ==> " NuGet"
162- ==> " PublishNuget"
163169 ==> " GenerateDocs"
170+ ==> " All"
171+
172+ " NuGet" ==> " PublishNuget"
173+ " GenerateDocs" ==> " ReleaseDocs"
174+
175+ " PublishNuget"
164176 ==> " ReleaseDocs"
165177 ==> " Release"
166178
0 commit comments