Skip to content

Commit

Permalink
Rev release version and fix build number on AppVeyor
Browse files Browse the repository at this point in the history
  • Loading branch information
tachyus-ryan committed Oct 13, 2014
1 parent 7af2ac5 commit dd35f62
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
@@ -1,3 +1,6 @@
### New in 2.3.6 - (Released 2014/10/13)
* Now generating docs!

### New in 2.3.0 - (Released 2014/09/26)
* Add QueryBuilder
* Add many more wrappers to Rx from F#, thanks to Jared Hester!
Expand Down
22 changes: 9 additions & 13 deletions build.fsx
Expand Up @@ -69,14 +69,10 @@ let release = parseReleaseNotes (IO.File.ReadAllLines "RELEASE_NOTES.md")
let isAppVeyorBuild = environVar "APPVEYOR" <> null
let nugetVersion =
if isAppVeyorBuild then
let versionParts = release.NugetVersion.Split([|'-'|])
let version = versionParts.[0]
let bugFixIndex = version.LastIndexOf('.')
let tempVersion = version.Substring(0, bugFixIndex)
// Split version string if it is suffixed with something like "-beta"
if versionParts.Length > 1 then
sprintf "%s.%s-%s" tempVersion buildVersion versionParts.[1]
else sprintf "%s.%s" tempVersion buildVersion
// If the `release.NugetVersion` contains a preview release, just append the `buildVersion`.
if release.NugetVersion.Contains("-") then
sprintf "%s%s" release.NugetVersion buildVersion
else sprintf "%s.%s" release.NugetVersion buildVersion
else release.NugetVersion

// Generate assembly info files with the right version & up-to-date information
Expand Down Expand Up @@ -161,7 +157,7 @@ Target "NuGet" (fun _ ->
Project = project
Summary = summary
Description = description
Version = nugetVersion
Version = release.NugetVersion
ReleaseNotes = String.Join(Environment.NewLine, release.Notes)
Tags = tags
OutputPath = "bin"
Expand Down Expand Up @@ -201,17 +197,17 @@ Target "ReleaseDocs" (fun _ ->

CopyRecursive "docs/output" tempDocsDir true |> tracefn "%A"
StageAll tempDocsDir
Commit tempDocsDir (sprintf "Update generated documentation for version %s" nugetVersion)
Commit tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion)
Branches.push tempDocsDir
)

Target "Release" (fun _ ->
StageAll ""
Commit "" (sprintf "Bump version to %s" nugetVersion)
Commit "" (sprintf "Bump version to %s" release.NugetVersion)
Branches.push ""

Branches.tag "" nugetVersion
Branches.pushTag "" "origin" nugetVersion
Branches.tag "" release.NugetVersion
Branches.pushTag "" "origin" release.NugetVersion
)

Target "BuildPackage" DoNothing
Expand Down

0 comments on commit dd35f62

Please sign in to comment.