Skip to content

Commit

Permalink
Merge pull request #25 from ekonbenefits/fix-deployment-naming
Browse files Browse the repository at this point in the history
Trying to fix deployment
  • Loading branch information
jbtule authored Apr 5, 2018
2 parents cfad02a + 2356268 commit 8261b3f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Version.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<VersionPrefix>2.0.8</VersionPrefix>
<VersionPrefix>2.0.9</VersionPrefix>
</PropertyGroup>
</Project>
36 changes: 27 additions & 9 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,42 @@
#I "packages/FAKE/tools"
#r "FakeLib.dll"
#r "System.Xml.Linq.dll"
open Fake
open System.Xml.Linq
open System.Xml.XPath
let sln = "./Dynamitey.sln"
let commonBuild target =
let buildMode = getBuildParamOrDefault "configuration" "Release"
let vsuffix = getBuildParamOrDefault "vsuffix" ""
let versionPrefix = "Version.props"
|> System.IO.File.ReadAllText
|> XDocument.Parse
|> (fun x -> x.XPathEvaluate("//VersionPrefix/text()"))
|> (fun x-> x :?> seq<obj>)
|> Seq.exactlyOne
|> sprintf "%A"
let vProp =
if System.Text.RegularExpressions.Regex.IsMatch(vsuffix, "^\d+$") then
"Version", versionPrefix + "." + vsuffix
else
"VersionSuffix", vsuffix
let setParams defaults =
{ defaults with
Verbosity = Some(Quiet)
Targets = [target]
Properties =
[
"Configuration", buildMode
"VersionSuffix", vsuffix
]
}
{ defaults with
Verbosity = Some(Quiet)
Targets = [target]
Properties =
[
"Configuration", buildMode
vProp
]
}
build setParams sln
|> DoNothing
Expand Down

0 comments on commit 8261b3f

Please sign in to comment.