Skip to content

Commit da01d31

Browse files
committed
make adding breaking changes to body optional for now, tool wont emit anything if no previous nuget package was found
1 parent ab86365 commit da01d31

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

build/scripts/Targets.fs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,18 @@ let private createReleaseOnGithub (arguments:ParseResults<Arguments>) =
104104
| None -> []
105105
| Some token -> ["--token"; token;]
106106
let releaseNotes = Paths.RootRelative <| Path.Combine(Paths.Output.FullName, sprintf "release-notes-%s.md" currentVersion)
107-
let breakingChanges = Paths.RootRelative <| Path.Combine(Paths.Output.FullName, "github-breaking-changes-comments.md")
107+
let breakingChanges =
108+
let file = Path.Combine(Paths.Output.FullName, "github-breaking-changes-comments.md")
109+
let relativeFile = Paths.RootRelative <| file
110+
match File.Exists file with
111+
| true -> ["--body"; relativeFile]
112+
| false -> []
108113
let releaseArgs =
109114
(Paths.Repository.Split("/") |> Seq.toList)
110115
@ ["create-release"
111116
"--version"; currentVersion
112117
"--body"; releaseNotes;
113-
"--body"; breakingChanges;
114-
] @ tokenArgs
118+
] @ breakingChanges @ tokenArgs
115119

116120
exec "dotnet" (["release-notes"] @ releaseArgs) |> ignore
117121

0 commit comments

Comments
 (0)