@@ -24,15 +24,11 @@ open Fake.Tools
2424open System
2525open System.IO
2626
27- // --------------------------------------------------------------------------------------
28- // START TODO: Provide project-specific details below
29- // --------------------------------------------------------------------------------------
30-
3127// The name of the project
3228// (used by attributes in AssemblyInfo, name of a NuGet package and directory in 'src')
3329let project = " src/FSharp.Control.AsyncSeq"
3430
35- // File system information
31+ // File system information
3632let solutionFile = " FSharp.Control.AsyncSeq.sln"
3733
3834let summary = " Asynchronous sequences for F#"
@@ -45,8 +41,8 @@ let projectRepo = "https://github.com/fsprojects/FSharp.Control.AsyncSeq"
4541
4642let configuration = DotNet.BuildConfiguration.fromEnvironVarOrDefault " configuration" DotNet.BuildConfiguration.Release
4743
48- // Folder to deposit deploy artifacts
49- let artifactsDir = __ SOURCE_ DIRECTORY__ @@ " artifacts "
44+ // Folder to deposit deploy bin
45+ let binDir = __ SOURCE_ DIRECTORY__ @@ " bin "
5046
5147// Read additional information from the release notes document
5248let release = ReleaseNotes.load " RELEASE_NOTES.md"
@@ -64,7 +60,7 @@ let versionPropsTemplate = $"\
6460
6561Target.create " Clean" ( fun _ ->
6662 DotNet.exec id " clean" " " |> ignore
67- Shell.cleanDirs [ " artifacts " ; " temp" ]
63+ Shell.cleanDirs [ " bin " ; " temp" ]
6864)
6965
7066// Generate assembly info files with the right version & up-to-date information
@@ -97,7 +93,7 @@ Target.create "Build" (fun _ ->
9793// --------------------------------------------------------------------------------------
9894// Run the unit tests using test runner
9995
100- Target.create " RunTests " ( fun _ ->
96+ Target.create " Test " ( fun _ ->
10197 solutionFile
10298 |> DotNet.test ( fun opts ->
10399 { opts with
@@ -112,13 +108,13 @@ Target.create "RunTests" (fun _ ->
112108// --------------------------------------------------------------------------------------
113109// Build a NuGet package
114110
115- Target.create " NuGet " ( fun _ ->
116-
111+ Target.create " Pack " ( fun _ ->
112+
117113 File.WriteAllText( " version.props" , versionPropsTemplate)
118114 DotNet.pack ( fun pack ->
119115 { pack with
120- OutputPath = Some artifactsDir
121- Configuration = configuration
116+ OutputPath = Some binDir
117+ Configuration = configuration
122118 }) solutionFile
123119)
124120
@@ -127,34 +123,7 @@ Target.create "NuGet" (fun _ ->
127123
128124Target.create " GenerateDocs" ( fun _ ->
129125 Shell.cleanDir " .fsdocs"
130- DotNet.exec id " fsdocs" " build --clean --properties Configuration=Release" |> ignore
131- )
132-
133- // --------------------------------------------------------------------------------------
134- // Release
135-
136- Target.create " PublishNuget" ( fun _ ->
137- let source = " https://api.nuget.org/v3/index.json"
138- let apikey = Environment.environVar " NUGET_KEY"
139- for artifact in !! ( artifactsDir + " /*nupkg" ) do
140- if not ( artifact.Contains( " .symbols" )) then
141- let result = DotNet.exec id " nuget" ( sprintf " push -s %s -k %s %s " source apikey artifact)
142- if not result.OK then failwith " failed to push packages"
143- )
144- Target.create " ReleaseDocs" ( fun _ ->
145- Git.Repository.clone " " projectRepo " temp/gh-pages"
146- Git.Branches.checkoutBranch " temp/gh-pages" " gh-pages"
147- Shell.copyRecursive " output" " temp/gh-pages" true |> printfn " %A "
148- Git.CommandHelper.runSimpleGitCommand " temp/gh-pages" " add ." |> printfn " %s "
149- let cmd = sprintf """ commit -a -m "Update generated documentation for version %s """ release.NugetVersion
150- Git.CommandHelper.runSimpleGitCommand " temp/gh-pages" cmd |> printfn " %s "
151- Git.Branches.push " temp/gh-pages"
152- )
153-
154- Target.create " Release" ( fun _ ->
155- Git.Branches.tag " " release.NugetVersion
156- Git.Branches.pushTag " " projectRepo release.NugetVersion
157-
126+ DotNet.exec id " fsdocs" " build --clean --properties Configuration=Release --eval" |> ignore
158127)
159128
160129// --------------------------------------------------------------------------------------
@@ -164,16 +133,13 @@ Target.create "All" ignore
164133
165134" Clean"
166135 ==> " Build"
167- ==> " RunTests"
168- ==> " NuGet"
169- ==> " GenerateDocs"
136+ ==> " Test"
137+ ==> " Pack"
170138 ==> " All"
171139
172- " NuGet" ==> " PublishNuget"
173- " GenerateDocs" ==> " ReleaseDocs"
174-
175- " PublishNuget"
176- ==> " ReleaseDocs"
177- ==> " Release"
140+ " Clean"
141+ ==> " Build"
142+ ==> " GenerateDocs"
143+ ==> " All"
178144
179145Target.runOrDefault " All"
0 commit comments