Skip to content

Commit 1d76895

Browse files
authored
Merge pull request #60 from pleonex:feature/skip-releasenotes-dev
🐛 Skip release notes on dev builds
2 parents 9355642 + 7a1c84a commit 1d76895

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/PleOps.Cake/releasenotes.cake

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ Task("Create-GitHubDraftRelease")
2323

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

0 commit comments

Comments
 (0)