Skip to content

Commit

Permalink
modified build script so if there's a beta version in the release not…
Browse files Browse the repository at this point in the history
…es, that ges automatically included in the NuGet package metadata (#4175)
  • Loading branch information
Aaronontheweb authored Jan 28, 2020
1 parent 1aed8a7 commit 595a5a8
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 @@ -30,15 +30,22 @@ let outputBinariesNetStandard = outputBinaries @@ "netstandard1.6"
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 releaseNotes =
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

let releaseNotes =
File.ReadLines "./RELEASE_NOTES.md"
|> ReleaseNotesHelper.parseReleaseNotes


// Incremental builds
let runIncrementally = hasBuildParam "incremental"
Expand Down

0 comments on commit 595a5a8

Please sign in to comment.