Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cpp-linter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ thiserror = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }

[dependencies.git-bot-feedback]
version = "0.5.4"
version = "0.5.5"
features = ["file-changes"]
# path = "../../git-bot-feedback"
# git = "https://github.com/2bndy5/git-bot-feedback"
Expand Down
18 changes: 5 additions & 13 deletions docs/license_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[MIT]: https://choosealicense.com/licenses/mit
[Apache-2.0]: https://choosealicense.com/licenses/apache-2.0/
[MPL-2.0]: https://choosealicense.com/licenses/mpl-2.0
[GPL-3.0]: https://choosealicense.com/licenses/gpl-3.0/
"""

TABLE_HEADER = "| Dependency | License |\n|:------------|:-------|\n"
Expand All @@ -23,17 +24,6 @@
{TABLE_HEADER}\
"""

OPTIONAL_DEPS = f"""## Optional dependencies

The following are conditionally included in binaries (using the `openssl-vendored`
feature on a case-by-case basis) because it is a dependency of
[git2](https://crates.io/crates/git2):

{TABLE_HEADER}\
| [openssl](https://crates.io/crates/openssl) | [Apache-2.0] |
| [openssl-probe](https://crates.io/crates/openssl-probe) | [MIT] OR [Apache-2.0] |
"""

PY_BINDING_HEADER = f"""## Bindings' dependencies

### Python binding
Expand All @@ -44,7 +34,9 @@

{TABLE_HEADER}"""

SELF_DEP = re.compile(r"(\| \[cpp-linter v[0-9.]+[^\s]*)[^\]]+(\]\(.*)$")
SELF_DEP = re.compile(
r"(\| \[(?:cpp-linter|clang-installer) v[0-9.]+[^\s]*)[^\]]+(\]\(.*)$"
)


class TreeGetter:
Expand Down Expand Up @@ -80,6 +72,7 @@ def get_output(self) -> str:
.replace(" MIT", " [MIT]")
.replace(" Apache-2.0", " [Apache-2.0]")
.replace(" MPL-2.0", " [MPL-2.0]")
.replace(" GPL-3.0", " [GPL-3.0]")
.strip()
)
self_match = SELF_DEP.match(dep)
Expand All @@ -96,7 +89,6 @@ def get_output(self) -> str:
doc += tg.get_output()
# print(doc)
print(doc, file=io_doc)
print(f"\n{OPTIONAL_DEPS}\n", file=io_doc)
tg.package("cpp-linter-py")
doc = tg.get_output()
print(f"\n{PY_BINDING_HEADER}{doc}", file=io_doc)
Expand Down
Loading