Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
added RELEASE_NOTES.md VersionSuffix support (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb authored Mar 5, 2020
1 parent e6b2817 commit be2a25c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,22 @@ let solutionFile = FindFirstMatchingFile "*.sln" __SOURCE_DIRECTORY__ // dynami
let buildNumber = environVarOrDefault "BUILD_NUMBER" "0"
let hasTeamCity = (not (buildNumber = "0")) // check if we have the TeamCity environment variable for build # set
let preReleaseVersionSuffix = "beta" + (if (not (buildNumber = "0")) then (buildNumber) else DateTime.UtcNow.Ticks.ToString())
let versionSuffix =
match (getBuildParam "nugetprerelease") with
| "dev" -> preReleaseVersionSuffix
| _ -> ""

let releaseNotes =
File.ReadLines "./RELEASE_NOTES.md"
File.ReadLines (__SOURCE_DIRECTORY__ @@ "RELEASE_NOTES.md")
|> ReleaseNotesHelper.parseReleaseNotes

let versionFromReleaseNotes =
match releaseNotes.SemVer.PreRelease with
| Some r -> r.Origin
| None -> ""

let versionSuffix =
match (getBuildParam "nugetprerelease") with
| "dev" -> preReleaseVersionSuffix
| "" -> versionFromReleaseNotes
| str -> str

// Directories
let toolsDir = __SOURCE_DIRECTORY__ @@ "tools"
let output = __SOURCE_DIRECTORY__ @@ "bin"
Expand Down

0 comments on commit be2a25c

Please sign in to comment.