@@ -69,12 +69,19 @@ Target "RestorePackages" (fun _ ->
6969 NoCache = false })
7070)
7171
72+ Target " AssemblyInfo" ( fun _ ->
73+ XmlPokeInnerText " ./src/common.props" " //Project/PropertyGroup/VersionPrefix" releaseNotes.AssemblyVersion
74+ XmlPokeInnerText " ./src/common.props" " //Project/PropertyGroup/PackageReleaseNotes" ( releaseNotes.Notes |> String.concat " \n " )
75+ )
76+
7277Target " Build" ( fun _ ->
78+ let additionalArgs = if versionSuffix.Length > 0 then [ sprintf " /p:VersionSuffix=%s " versionSuffix] else []
7379 DotNetCli.Build
7480 ( fun p ->
7581 { p with
7682 Project = solutionFile
77- Configuration = configuration })
83+ Configuration = configuration
84+ AdditionalArgs = additionalArgs})
7885)
7986
8087//--------------------------------------------------------------------------------
@@ -224,6 +231,7 @@ let overrideVersionSuffix (project:string) =
224231 match project with
225232 | _ -> versionSuffix // add additional matches to publish different versions for different projects in solution
226233Target " CreateNuget" ( fun _ ->
234+ CreateDir outputNuGet // need this to stop Azure pipelines copy stage from error-ing out
227235 let projects = !! " src/**/*.csproj"
228236 -- " src/**/*Tests.csproj" // Don't publish unit tests
229237 -- " src/**/*Tests*.csproj"
@@ -234,9 +242,9 @@ Target "CreateNuget" (fun _ ->
234242 { p with
235243 Project = project
236244 Configuration = configuration
237- AdditionalArgs = [ " --include-symbols --no-build " ]
238- VersionSuffix = overrideVersionSuffix project
239- OutputPath = outputNuGet })
245+ AdditionalArgs = [ " --include-symbols" ]
246+ VersionSuffix = versionSuffix
247+ OutputPath = " \" " + outputNuGet + " \" " })
240248
241249 projects |> Seq.iter ( runSingleProject)
242250)
@@ -315,7 +323,7 @@ Target "RunTestsFull" DoNothing
315323Target " RunTestsNetCoreFull" DoNothing
316324
317325// build dependencies
318- " Clean" ==> " RestorePackages" ==> " Build" ==> " BuildRelease"
326+ " Clean" ==> " RestorePackages" ==> " AssemblyInfo " ==> " Build" ==> " BuildRelease"
319327
320328// tests dependencies
321329" Build" ==> " RunTests"
0 commit comments