mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 07:54:36 +00:00
rename deploy_chatmail to cmdeploy
This commit is contained in:
@@ -22,7 +22,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
cmdeploy = "deploy_chatmail.cmdeploy:main"
|
||||
cmdeploy = "cmdeploy.cmdeploy:main"
|
||||
|
||||
[project.entry-points.pytest11]
|
||||
"chatmaild.testplugin" = "chatmaild.tests.plugin"
|
||||
@@ -53,9 +53,9 @@ def run_cmd(args, out):
|
||||
|
||||
env = os.environ.copy()
|
||||
env["CHATMAIL_DOMAIN"] = args.config.mail_domain
|
||||
deploypy = "deploy-chatmail/src/deploy_chatmail/deploy.py"
|
||||
deploy_path = "cmdeploy/src/cmdeploy/deploy.py"
|
||||
pyinf = "pyinfra --dry" if args.dry_run else "pyinfra"
|
||||
cmd = f"{pyinf} --ssh-user root {args.config.mail_domain} {deploypy}"
|
||||
cmd = f"{pyinf} --ssh-user root {args.config.mail_domain} {deploy_path}"
|
||||
out.check_call(cmd, env=env)
|
||||
|
||||
|
||||
@@ -148,9 +148,9 @@ def fmt_cmd(args, out):
|
||||
"""Run formattting fixes (fuff and black) on all chatmail source code."""
|
||||
|
||||
chatmaild = importlib.resources.files("chatmaild")
|
||||
deploy_chatmail = importlib.resources.files("deploy_chatmail")
|
||||
tests = deploy_chatmail.joinpath("../../../tests")
|
||||
sources = list(str(x) for x in [chatmaild, deploy_chatmail, tests])
|
||||
cmdeploy = importlib.resources.files("cmdeploy")
|
||||
tests = cmdeploy.joinpath("../../../tests")
|
||||
sources = list(str(x) for x in [chatmaild, cmdeploy, tests])
|
||||
|
||||
black_args = [shutil.which("black")]
|
||||
ruff_args = [shutil.which("ruff")]
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
import pyinfra
|
||||
from deploy_chatmail import deploy_chatmail
|
||||
from cmdeploy import deploy_chatmail
|
||||
|
||||
|
||||
def main():
|
||||
@@ -2,8 +2,8 @@
|
||||
set -e
|
||||
python3 -m venv venv
|
||||
|
||||
venv/bin/pip install -e deploy-chatmail
|
||||
venv/bin/pip install -e chatmaild
|
||||
venv/bin/pip install -e cmdeploy
|
||||
|
||||
source venv/bin/activate
|
||||
echo activated 'venv' python virtualenv environment containing "cmdeploy" tool
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from deploy_chatmail.genqr import gen_qr_png_data
|
||||
from cmdeploy.genqr import gen_qr_png_data
|
||||
|
||||
|
||||
def test_gen_qr_png_data(maildomain):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from deploy_chatmail.cmdeploy import get_parser, main
|
||||
from cmdeploy.cmdeploy import get_parser, main
|
||||
from chatmaild.config import read_config
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import importlib.resources
|
||||
|
||||
from deploy_chatmail.www import build_webpages
|
||||
from cmdeploy.www import build_webpages
|
||||
|
||||
|
||||
def test_build_webpages(tmp_path, make_config):
|
||||
pkgroot = importlib.resources.files("deploy_chatmail")
|
||||
pkgroot = importlib.resources.files("cmdeploy")
|
||||
src_dir = pkgroot.joinpath("../../../www/src").resolve()
|
||||
assert src_dir.exists(), src_dir
|
||||
config = make_config("chat.example.org")
|
||||
|
||||
Reference in New Issue
Block a user