Compare commits
No commits in common. "599f28fe73f70212c2e6357454e910e5cadcd1a0" and "311b20bdf2bc0dd18af882abcc42a08efe0fc69d" have entirely different histories.
599f28fe73
...
311b20bdf2
9 changed files with 114 additions and 133 deletions
|
|
@ -121,7 +121,11 @@ steps:
|
||||||
image: documentation:latest
|
image: documentation:latest
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
commands:
|
||||||
|
- pwd
|
||||||
- cd docs
|
- cd docs
|
||||||
|
- mkdir generated
|
||||||
|
- touch generated/changelogs.rst
|
||||||
|
- touch generated/api.rst
|
||||||
- sphinx-build -M html . .
|
- sphinx-build -M html . .
|
||||||
|
|
||||||
- rm -rf /light_docs_dev/*
|
- rm -rf /light_docs_dev/*
|
||||||
|
|
|
||||||
2
docs/.gitignore
vendored
2
docs/.gitignore
vendored
|
|
@ -1,5 +1,3 @@
|
||||||
_build/
|
_build/
|
||||||
generated/
|
generated/
|
||||||
html/
|
|
||||||
xml/
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
TARGET = ./
|
|
||||||
INPUT = "../modules"
|
|
||||||
RECURSIVE = YES
|
|
||||||
|
|
||||||
PROJECT_NAME = "Light"
|
|
||||||
JAVADOC_AUTOBRIEF = YES
|
|
||||||
JAVADOC_BANNER = YES
|
|
||||||
GENERATE_XML = YES
|
|
||||||
|
|
||||||
EXTRACT_PRIVATE = NO
|
|
||||||
EXTRACT_STATIC = NO
|
|
||||||
EXTRACT_LOCAL_CLASSES = NO
|
|
||||||
HIDE_UNDOC_RELATIONS = YES
|
|
||||||
HAVE_DOT = NO
|
|
||||||
|
|
||||||
GENERATE_TODOLIST = NO
|
|
||||||
GENERATE_HTML = NO
|
|
||||||
GENERATE_DOCSET = NO
|
|
||||||
GENERATE_HTMLHELP = NO
|
|
||||||
GENERATE_CHI = NO
|
|
||||||
GENERATE_QHP = NO
|
|
||||||
GENERATE_ECLIPSEHELP = NO
|
|
||||||
GENERATE_TREEVIEW = NO
|
|
||||||
GENERATE_LATEX = NO
|
|
||||||
GENERATE_RTF = NO
|
|
||||||
GENERATE_MAN = NO
|
|
||||||
GENERATE_DOCBOOK = NO
|
|
||||||
GENERATE_AUTOGEN_DEF = NO
|
|
||||||
GENERATE_SQLITE3 = NO
|
|
||||||
GENERATE_PERLMOD = NO
|
|
||||||
GENERATE_TAGFILE = NO
|
|
||||||
GENERATE_LEGEND = NO
|
|
||||||
GENERATE_TESTLIST = NO
|
|
||||||
GENERATE_BUGLIST = NO
|
|
||||||
GENERATE_DEPRECATEDLIST= NO
|
|
||||||
|
|
||||||
FILE_PATTERNS = *.c \
|
|
||||||
*.cc \
|
|
||||||
*.cxx \
|
|
||||||
*.cxxm \
|
|
||||||
*.cpp \
|
|
||||||
*.cppm \
|
|
||||||
*.ccm \
|
|
||||||
*.c++ \
|
|
||||||
*.c++m \
|
|
||||||
*.java \
|
|
||||||
*.ii \
|
|
||||||
*.ixx \
|
|
||||||
*.ipp \
|
|
||||||
*.i++ \
|
|
||||||
*.inl \
|
|
||||||
*.idl \
|
|
||||||
*.ddl \
|
|
||||||
*.odl \
|
|
||||||
*.h \
|
|
||||||
*.hh \
|
|
||||||
*.hxx \
|
|
||||||
*.hpp \
|
|
||||||
*.h++ \
|
|
||||||
*.l \
|
|
||||||
*.cs \
|
|
||||||
*.d \
|
|
||||||
*.php \
|
|
||||||
*.php4 \
|
|
||||||
*.php5 \
|
|
||||||
*.phtml \
|
|
||||||
*.inc \
|
|
||||||
*.m \
|
|
||||||
*.markdown \
|
|
||||||
*.md \
|
|
||||||
*.mm \
|
|
||||||
*.dox \
|
|
||||||
*.py \
|
|
||||||
*.pyw \
|
|
||||||
*.f90 \
|
|
||||||
*.f95 \
|
|
||||||
*.f03 \
|
|
||||||
*.f08 \
|
|
||||||
*.f18 \
|
|
||||||
*.f \
|
|
||||||
*.for \
|
|
||||||
*.vhd \
|
|
||||||
*.vhdl \
|
|
||||||
*.ucf \
|
|
||||||
*.qsf \
|
|
||||||
*.ice
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
Application
|
|
||||||
===================================================================================================
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 3
|
|
||||||
:caption: App
|
|
||||||
|
|
||||||
Functions
|
|
||||||
---------------------------------------------------------------------------------------------------
|
|
||||||
.. doxygenfunction:: main
|
|
||||||
|
|
||||||
Classes
|
|
||||||
---------------------------------------------------------------------------------------------------
|
|
||||||
.. doxygenclass:: lt::app::ISystem
|
|
||||||
|
|
||||||
.. doxygenstruct:: lt::app::TickInfo
|
|
||||||
|
|
||||||
.. doxygenstruct:: lt::app::TickResult
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
Renderer
|
|
||||||
===================================================================================================
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 3
|
|
||||||
:caption: App
|
|
||||||
|
|
||||||
Classes
|
|
||||||
---------------------------------------------------------------------------------------------------
|
|
||||||
.. doxygenenum:: lt::renderer::Api
|
|
||||||
|
|
||||||
.. doxygenclass:: lt::renderer::System
|
|
||||||
|
|
||||||
.. doxygenstruct:: lt::renderer::components::Sprite
|
|
||||||
14
docs/conf.py
14
docs/conf.py
|
|
@ -13,21 +13,13 @@ author = 'light7734'
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||||
|
|
||||||
extensions = ['breathe']
|
extensions = []
|
||||||
|
|
||||||
breathe_projects = {"Light": "./xml"}
|
|
||||||
breathe_default_project = "Light"
|
|
||||||
breathe_default_members = ()
|
|
||||||
|
|
||||||
# Tell sphinx what the primary language being documented is.
|
|
||||||
primary_domain = 'cpp'
|
|
||||||
|
|
||||||
# Tell sphinx what the pygments highlight language should be.
|
|
||||||
highlight_language = 'cpp'
|
|
||||||
|
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTML output -------------------------------------------------
|
# -- Options for HTML output -------------------------------------------------
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
||||||
|
|
||||||
|
|
|
||||||
68
docs/generate_changelog.py
Normal file
68
docs/generate_changelog.py
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
from git import Repo
|
||||||
|
import re
|
||||||
|
|
||||||
|
repo = Repo(search_parent_directories=True)
|
||||||
|
assert not repo.bare
|
||||||
|
|
||||||
|
file_path = "generated/changelog.rst"
|
||||||
|
|
||||||
|
messages = []
|
||||||
|
short_shas = []
|
||||||
|
hex_shas = []
|
||||||
|
logs = []
|
||||||
|
|
||||||
|
remote_url = "https://git.light7734.com/light7734/light/commit"
|
||||||
|
def format_log(commit_type, message, major, minor, patch, short_sha, hex_sha):
|
||||||
|
href = f"{remote_url}/{hex_sha}"
|
||||||
|
version = f"{major}.{minor}.{patch}-kitten+{short_sha}";
|
||||||
|
link = f"`{version} <{remote_url}/{hex_sha}>`__"
|
||||||
|
return f"| **{message}** ({link})"
|
||||||
|
|
||||||
|
for commit in repo.iter_commits():
|
||||||
|
messages.append(commit.summary)
|
||||||
|
short_shas.append(repo.git.rev_parse(commit.hexsha, short=5))
|
||||||
|
hex_shas.append(commit.hexsha)
|
||||||
|
|
||||||
|
ver_major = 0
|
||||||
|
ver_minor = 0
|
||||||
|
ver_patch = 0
|
||||||
|
|
||||||
|
idx = len(messages)
|
||||||
|
for message in reversed(messages):
|
||||||
|
idx = idx - 1;
|
||||||
|
|
||||||
|
commit_type = re.match("^(feat|fix|refactor|perf|build|asset|test|chore|ci|docs)", message)
|
||||||
|
if not commit_type:
|
||||||
|
continue
|
||||||
|
|
||||||
|
match commit_type.group(0):
|
||||||
|
case "feat":
|
||||||
|
ver_minor = ver_minor + 1
|
||||||
|
ver_patch = 0
|
||||||
|
|
||||||
|
case "fix":
|
||||||
|
ver_patch = ver_patch + 1
|
||||||
|
|
||||||
|
case "refactor":
|
||||||
|
ver_patch = ver_patch + 1
|
||||||
|
|
||||||
|
case "perf":
|
||||||
|
ver_patch = ver_patch + 1
|
||||||
|
|
||||||
|
case "build":
|
||||||
|
ver_patch = ver_patch + 1
|
||||||
|
|
||||||
|
case "asset":
|
||||||
|
ver_patch = ver_patch + 1
|
||||||
|
|
||||||
|
logs.append(format_log(commit_type, message, ver_major, ver_minor, ver_patch, short_shas[idx], hex_shas[idx]))
|
||||||
|
|
||||||
|
with open(file_path, "w") as f:
|
||||||
|
f.write(".. changelogs\n\n\n")
|
||||||
|
f.write("Changelogs\n")
|
||||||
|
f.write("==================================================\n\n")
|
||||||
|
|
||||||
|
f.write("KITTEN\n")
|
||||||
|
f.write("--------------------------------------------------\n\n")
|
||||||
|
for log in reversed(logs):
|
||||||
|
f.write(log + '\n')
|
||||||
|
|
@ -23,10 +23,10 @@
|
||||||
guidelines/conventions.rst
|
guidelines/conventions.rst
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 3
|
:maxdepth: 2
|
||||||
:caption: API
|
:caption: Generated Docs
|
||||||
|
|
||||||
api/app.rst
|
generated/api.rst
|
||||||
api/renderer.rst
|
generated/changelog.rst
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
35
docs/make.bat
Normal file
35
docs/make.bat
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
pushd %~dp0
|
||||||
|
|
||||||
|
REM Command file for Sphinx documentation
|
||||||
|
|
||||||
|
if "%SPHINXBUILD%" == "" (
|
||||||
|
set SPHINXBUILD=sphinx-build
|
||||||
|
)
|
||||||
|
set SOURCEDIR=.
|
||||||
|
set BUILDDIR=_build
|
||||||
|
|
||||||
|
%SPHINXBUILD% >NUL 2>NUL
|
||||||
|
if errorlevel 9009 (
|
||||||
|
echo.
|
||||||
|
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||||
|
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||||
|
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||||
|
echo.may add the Sphinx directory to PATH.
|
||||||
|
echo.
|
||||||
|
echo.If you don't have Sphinx installed, grab it from
|
||||||
|
echo.https://www.sphinx-doc.org/
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%1" == "" goto help
|
||||||
|
|
||||||
|
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:help
|
||||||
|
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||||
|
|
||||||
|
:end
|
||||||
|
popd
|
||||||
Loading…
Add table
Reference in a new issue