@@ -45,17 +45,8 @@ module Release =
4545 let semanticVersion = SemVerHelper.parse version
4646 sprintf " %i " ( semanticVersion.Major + 1 )
4747
48- let private addKeyValue ( e : Expr < string >) ( builder : StringBuilder ) =
49- // the binding for this tuple looks like key/value should
50- // be round the other way (but it's correct as is)...
51- let ( value , key ) =
52- match e with
53- | PropertyGet ( eo, pi, li) -> ( pi.Name, ( pi.GetValue( e) |> string))
54- | ValueWithName ( obj, ty, nm) -> (( obj |> string), nm)
55- | _ -> failwith ( sprintf " %A is not a let-bound value. %A " e ( e.GetType()))
56-
57- if ( isNotNullOrEmpty value) then builder.AppendFormat( " {0}=\" {1}\" ;" , key, value)
58- else builder
48+ let private addKeyValue ( key : string ) ( value : string ) ( builder : StringBuilder ) =
49+ builder.AppendFormat( " {0}=\" {1}\" ;" , key, value)
5950
6051 let private currentVersion = sprintf " %O " <| Versioning.CurrentVersion
6152 let private currentMajorVersion = sprintf " %i " <| Versioning.CurrentVersion.Major
@@ -64,9 +55,9 @@ module Release =
6455
6556 let private props () =
6657 new StringBuilder()
67- |> addKeyValue <@ currentMajorVersion@>
68- |> addKeyValue <@ nextMajorVersion@>
69- |> addKeyValue <@ year@>
58+ |> addKeyValue " currentMajorVersion" currentMajorVersion
59+ |> addKeyValue " nextMajorVersion" nextMajorVersion
60+ |> addKeyValue " year" year
7061
7162 let pack file n properties =
7263 Tooling.Nuget.Exec [ " pack" ; file;
@@ -147,8 +138,8 @@ module Release =
147138
148139 let properties =
149140 props()
150- |> addKeyValue <@ jsonDotNetCurrentVersion@>
151- |> addKeyValue <@ jsonDotNetNextVersion@>
141+ |> addKeyValue " jsonDotNetCurrentVersion" jsonDotNetCurrentVersion
142+ |> addKeyValue " jsonDotNetNextVersion" jsonDotNetNextVersion
152143 |> toText
153144 let nugetId = p.NugetId
154145 let nuspec = ( sprintf @" build/%s.nuspec" nugetId)
0 commit comments