@@ -174,19 +174,7 @@ let PrintNugetVersion () =
174
174
Console.Out.Flush()
175
175
failwith " nuget process' output contained errors ^"
176
176
177
- let BuildSolutionOrProject
178
- ( buildToolAndBuildArg : string * string )
179
- ( file : FileInfo )
180
- ( binaryConfig : BinaryConfig )
181
- ( maybeConstant : Option < string >)
182
- ( extraOptions : string )
183
- =
184
- #if LEGACY_ FRAMEWORK
185
- NugetRestore file
186
- #endif
187
-
188
- let buildTool , buildArg = buildToolAndBuildArg
189
-
177
+ let GetBuildFlags ( buildTool : string ) ( binaryConfig ) ( maybeConstant : Option < string >) =
190
178
let configOption =
191
179
if buildTool.StartsWith " dotnet" then
192
180
sprintf " --configuration %s " ( binaryConfig.ToString())
@@ -235,6 +223,24 @@ let BuildSolutionOrProject
235
223
sprintf " %s -property:DefineConstants=\\\" %s \\\" " configOption ( String.Join( semiColon, defineConstants))
236
224
else
237
225
configOption
226
+
227
+ configOptions
228
+
229
+ let BuildSolutionOrProject
230
+ ( buildToolAndBuildArg : string * string )
231
+ ( file : FileInfo )
232
+ ( binaryConfig : BinaryConfig )
233
+ ( maybeConstant : Option < string >)
234
+ ( extraOptions : string )
235
+ =
236
+ #if LEGACY_ FRAMEWORK
237
+ NugetRestore file
238
+ #endif
239
+
240
+ let buildTool , buildArg = buildToolAndBuildArg
241
+
242
+ let configOptions = GetBuildFlags buildTool binaryConfig maybeConstant
243
+
238
244
let buildArgs = sprintf " %s %s %s %s "
239
245
buildArg
240
246
file.FullName
@@ -687,10 +693,17 @@ match maybeTarget with
687
693
let backendDir = GetPathToBackend()
688
694
let backendProj = Path.Combine( backendDir.FullName, BACKEND_ LIB + " .fsproj" )
689
695
696
+ let binaryConfig =
697
+ if isTag then
698
+ BinaryConfig.Release
699
+ else
700
+ BinaryConfig.Debug
701
+ let buildFlags = GetBuildFlags " dotnet" binaryConfig None
702
+ let allBuildFlags = sprintf " %s -property:Version=%s " buildFlags nugetVersion
690
703
Process.Execute(
691
704
{
692
705
Command = " dotnet"
693
- Arguments = sprintf " pack -property:Version= %s %s " nugetVersion backendProj
706
+ Arguments = sprintf " pack %s %s " allBuildFlags backendProj
694
707
},
695
708
Echo.All
696
709
) .UnwrapDefault() |> ignore< string>
0 commit comments