Skip to content

Commit

Permalink
Add mod sidedness comment to compressed changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
wlhlm committed Dec 5, 2024
1 parent 72111ee commit 672ee04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/gtnh/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ class ModEntry:
def __init__(self, name: str, version: str, is_new: bool) -> None:
self.name: str = name
self.version: str = version
self.side_info: str = ""
self.is_new: bool = is_new
self.changes: List[str] = []
self.new_contributors: List[str] = []
Expand Down
7 changes: 6 additions & 1 deletion src/gtnh/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ def compress_changelog(file_path: Path) -> None:
in_changes_mode = False
entries.append(current_entry)
elif current_entry:
if line == ">## What's Changed":
if line.startswith("Mod is ") or line.startswith("Mod side changed from "):
current_entry.side_info = line
elif line == ">## What's Changed":
in_changes_mode = True
elif line == ">## New Contributors":
in_changes_mode = False
Expand Down Expand Up @@ -213,6 +215,9 @@ def compress_changelog(file_path: Path) -> None:
"# Updated " + ent.name + " (" + re.sub("^(.*)\\.\\.\\.(.*)$", r"\1 --> \2", ent.version) + ")\n"
)

if ent.side_info != "":
lines.append(ent.side_info + "\n")

if ent.is_new or ent.newest_link_version == "":
lines.append(
"**Full Changelog**: https://github.com/GTNewHorizons/"
Expand Down

0 comments on commit 672ee04

Please sign in to comment.