mirror of
https://github.com/chatmail/relay.git
synced 2026-05-20 21:08:03 +00:00
some more housekeeping
This commit is contained in:
@@ -19,6 +19,9 @@ dependencies = [
|
|||||||
[project.scripts]
|
[project.scripts]
|
||||||
cmdeploy = "deploy_chatmail.cmdeploy:main"
|
cmdeploy = "deploy_chatmail.cmdeploy:main"
|
||||||
|
|
||||||
|
[tool.setuptools_scm]
|
||||||
|
write_to = "src/deploy_chatmail/_version.py"
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
addopts = "-v -ra --strict-markers"
|
addopts = "-v -ra --strict-markers"
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ def add_subcommand(subparsers, func):
|
|||||||
name = func.__name__
|
name = func.__name__
|
||||||
assert name.endswith("_cmd")
|
assert name.endswith("_cmd")
|
||||||
name = name[:-4]
|
name = name[:-4]
|
||||||
doc = func.__doc__.strip()
|
doc = func.__doc__.strip().strip(".")
|
||||||
p = subparsers.add_parser(name, description=doc, help=doc)
|
p = subparsers.add_parser(name, description=doc, help=doc)
|
||||||
p.set_defaults(func=func)
|
p.set_defaults(func=func)
|
||||||
add_config_option(p)
|
add_config_option(p)
|
||||||
@@ -80,13 +80,10 @@ def get_parser():
|
|||||||
help="don't actually modify the server",
|
help="don't actually modify the server",
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subcommand(subparsers, webdev_cmd)
|
|
||||||
|
|
||||||
add_subcommand(subparsers, test_cmd)
|
|
||||||
|
|
||||||
add_subcommand(subparsers, bench_cmd)
|
|
||||||
|
|
||||||
add_subcommand(subparsers, dns_cmd)
|
add_subcommand(subparsers, dns_cmd)
|
||||||
|
add_subcommand(subparsers, bench_cmd)
|
||||||
|
add_subcommand(subparsers, test_cmd)
|
||||||
|
add_subcommand(subparsers, webdev_cmd)
|
||||||
|
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@@ -116,7 +113,7 @@ def run_cmd(args, out, config):
|
|||||||
|
|
||||||
|
|
||||||
def webdev_cmd(args, out, config):
|
def webdev_cmd(args, out, config):
|
||||||
"""Run web development loop for static local web pages."""
|
"""Run local web development loop for static web pages."""
|
||||||
from .www import main
|
from .www import main
|
||||||
|
|
||||||
main()
|
main()
|
||||||
@@ -153,7 +150,7 @@ def read_dkim_entries(entry):
|
|||||||
|
|
||||||
|
|
||||||
def dns_cmd(args, out, config):
|
def dns_cmd(args, out, config):
|
||||||
"""generate dns zone file."""
|
"""Generate dns zone file."""
|
||||||
template = importlib.resources.files(__package__).joinpath("chatmail.zone.f")
|
template = importlib.resources.files(__package__).joinpath("chatmail.zone.f")
|
||||||
ssh = f"ssh root@{config.mailname}"
|
ssh = f"ssh root@{config.mailname}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user