diff --git a/scripts/extract-release-notes b/scripts/extract-release-notes index 8b75743..4230338 100755 --- a/scripts/extract-release-notes +++ b/scripts/extract-release-notes @@ -26,7 +26,7 @@ def parse_args(): parser.add_argument( '--format', '-f', - choices=['github', 'spigot', 'curse'], + choices=['github', 'hangar', 'spigot', 'curse'], help='the format to output the release notes in', ) @@ -80,6 +80,8 @@ def extract(target): def output(lines, fmt): if fmt == 'github': output_as_github_markdown(lines) + elif fmt == 'hangar': + output_as_hangar_markdown(lines) elif fmt == 'spigot': output_as_spigot_bbcode(lines) elif fmt == 'curse': @@ -97,6 +99,15 @@ def output_as_github_markdown(lines): output_raw(lines[1:]) +def output_as_hangar_markdown(lines): + """ + Hangar Versions use Markdown in the same format as GitHub Releases, so we + don't actually need to do anything else here either. Just strip the first + line so we don't get a duplicate header. + """ + output_raw(lines[1:]) + + def output_as_spigot_bbcode(lines): """ Spigot uses BBCode for resource update descriptions. It's very similar to