Merge 1.18 into 1.19.2
This commit is contained in:
commit
f715a0c8a3
21
.github/workflows/wiki_update.yml
vendored
Normal file
21
.github/workflows/wiki_update.yml
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
name: update-wiki
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '1.**'
|
||||
|
||||
jobs:
|
||||
wikigen:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- run: python3 scripts/gen-markdown-patchlist.py
|
||||
- name: Upload generated file to wiki
|
||||
uses: SwiftDocOrg/github-wiki-publish-action@v1
|
||||
with:
|
||||
path: "doc/generated"
|
||||
env:
|
||||
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.WIKI_TOKEN }}
|
||||
1
doc/generated/.gitignore
vendored
Normal file
1
doc/generated/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
*.md
|
||||
27
scripts/gen-markdown-patchlist.py
Normal file
27
scripts/gen-markdown-patchlist.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
from contextlib import redirect_stdout
|
||||
|
||||
branch_name = subprocess.check_output(['git', 'branch', '--show-current']).decode("utf-8").strip()
|
||||
|
||||
with open('doc/generated/' + branch_name + '-Summary-of-Patches.md', 'w') as output_file:
|
||||
with redirect_stdout(output_file):
|
||||
with open('common/src/main/resources/assets/modernfix/lang/en_us.json') as lang_json:
|
||||
lang_obj = json.loads(lang_json.read())
|
||||
option_names = []
|
||||
for key, value in lang_obj.items():
|
||||
if key.startswith("modernfix.option.mixin."):
|
||||
option_names.append(key.replace("modernfix.option.", ""))
|
||||
option_names.sort()
|
||||
print("# Summary of Patches - " + branch_name)
|
||||
print()
|
||||
for option in option_names:
|
||||
option_description = lang_obj.get("modernfix.option." + option)
|
||||
option_friendly_name = lang_obj.get("modernfix.option.name." + option)
|
||||
print(f"# `{option}`")
|
||||
print()
|
||||
if option_description is not None:
|
||||
print(option_description)
|
||||
print("")
|
||||
Loading…
Reference in New Issue
Block a user