mirror of
https://github.com/garbagemule/MobArena.git
synced 2025-02-05 15:11:20 +01:00
Add hangar
format to release note script.
Hangar uses Markdown, so this is a very easy release note "conversion" just like GitHub Releases.
This commit is contained in:
parent
8e5d2f0d23
commit
b881943656
@ -26,7 +26,7 @@ def parse_args():
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--format',
|
'--format',
|
||||||
'-f',
|
'-f',
|
||||||
choices=['github', 'spigot', 'curse'],
|
choices=['github', 'hangar', 'spigot', 'curse'],
|
||||||
help='the format to output the release notes in',
|
help='the format to output the release notes in',
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -80,6 +80,8 @@ def extract(target):
|
|||||||
def output(lines, fmt):
|
def output(lines, fmt):
|
||||||
if fmt == 'github':
|
if fmt == 'github':
|
||||||
output_as_github_markdown(lines)
|
output_as_github_markdown(lines)
|
||||||
|
elif fmt == 'hangar':
|
||||||
|
output_as_hangar_markdown(lines)
|
||||||
elif fmt == 'spigot':
|
elif fmt == 'spigot':
|
||||||
output_as_spigot_bbcode(lines)
|
output_as_spigot_bbcode(lines)
|
||||||
elif fmt == 'curse':
|
elif fmt == 'curse':
|
||||||
@ -97,6 +99,15 @@ def output_as_github_markdown(lines):
|
|||||||
output_raw(lines[1:])
|
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):
|
def output_as_spigot_bbcode(lines):
|
||||||
"""
|
"""
|
||||||
Spigot uses BBCode for resource update descriptions. It's very similar to
|
Spigot uses BBCode for resource update descriptions. It's very similar to
|
||||||
|
Loading…
Reference in New Issue
Block a user