Skip to content

Commit

Permalink
Merge pull request #60 from pleonex:feature/skip-releasenotes-dev
Browse files Browse the repository at this point in the history
🐛 Skip release notes on dev builds
  • Loading branch information
pleonex authored Jul 31, 2022
2 parents 9355642 + 7a1c84a commit 1d76895
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/PleOps.Cake/releasenotes.cake
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ Task("Create-GitHubDraftRelease")

Task("Export-GitHubReleaseNotes")
.Description("Export all the release notes from GitHub into a file")
.WithCriteria<BuildInfo>((ctxt, info) => info.BuildType != BuildType.Development)
.WithCriteria<BuildInfo>((ctxt, info) => !string.IsNullOrEmpty(info.GitHubToken))
.Does<BuildInfo>(info =>
{
// Cannot build for dev builds because GitReleaseManager will fail if there
// isn't any PR / issue on a milestone closed.
// Export last milestone to embed in apps and NuGets
string milestone = info.BuildType switch {
BuildType.Development => info.WorkMilestone,
BuildType.Preview => info.WorkMilestone,
BuildType.Stable => $"v{info.Version}",
_ => throw new Exception("Unknown build type for milestone"),
Expand Down

0 comments on commit 1d76895

Please sign in to comment.