@@ -370,14 +370,14 @@ module DocsTool =
370370 WorkingDirectory = rootDirectory
371371 }
372372
373- let fsDocsBuildParams ( p : Fsdocs.BuildCommandParams ) =
373+ let fsDocsBuildParams configuration ( p : Fsdocs.BuildCommandParams ) =
374374 { p with
375375 Clean = Some true
376376 Input = Some( quoted docsSrcDir)
377377 Output = Some( quoted docsDir)
378378 Eval = Some true
379379 Projects = Some( Seq.map quoted (!! srcGlob))
380- // Properties = Some ($"Version={version} PackageVersion={version }")
380+ Properties = Some( $" Configuration= %s {configuration }" )
381381 Parameters =
382382 Some [
383383 // https://fsprojects.github.io/FSharp.Formatting/content.html#Templates-and-Substitutions
@@ -395,15 +395,15 @@ module DocsTool =
395395
396396 let cleanDocsCache () = Fsdocs.cleanCache rootDirectory
397397
398- let build () =
399- Fsdocs.build fsDocsDotnetOptions ( fsDocsBuildParams)
398+ let build ( configuration ) =
399+ Fsdocs.build fsDocsDotnetOptions ( fsDocsBuildParams configuration )
400400
401401
402- let watch () =
402+ let watch ( configuration ) =
403403 let buildParams bp =
404404 let bp =
405405 Option.defaultValue Fsdocs.BuildCommandParams.Default bp
406- |> fsDocsBuildParams
406+ |> fsDocsBuildParams configuration
407407
408408 { bp with
409409 Output = Some watchDocsDir
@@ -844,14 +844,13 @@ let dotnetPack ctx =
844844 let args = [
845845 $" /p:PackageVersion={latestEntry.NuGetVersion}"
846846 $" /p:PackageReleaseNotes=\" {releaseNotes}\" "
847- $" /p:PackageOutputPath={distDir}" // https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/7.0/solution-level-output-no-longer-valid
848847 ]
849848
850849 DotNet.pack
851850 ( fun c ->
852851 { c with
853852 Configuration = configuration ( ctx.Context.AllExecutingTargets)
854-
853+ OutputPath = Some distDir
855854 Common =
856855 c.Common
857856 |> DotNet.Options.withAdditionalArgs args
@@ -980,9 +979,14 @@ let checkFormatCode _ =
980979
981980let cleanDocsCache _ = DocsTool.cleanDocsCache ()
982981
983- let buildDocs _ = DocsTool.build ()
982+ let buildDocs ctx =
983+ let configuration = configuration ( ctx.Context.AllExecutingTargets)
984+ DocsTool.build ( string configuration)
985+
986+ let watchDocs ctx =
984987
985- let watchDocs _ = DocsTool.watch ()
988+ let configuration = configuration ( ctx.Context.AllExecutingTargets)
989+ DocsTool.watch ( string configuration)
986990
987991let releaseDocs ctx =
988992 isReleaseBranchCheck () // Docs changes don't need a full release to the library
0 commit comments