refactor!: rename the project from Monitor to MoShiro [CI]
ci/woodpecker/push/main-amd64-build Pipeline was successful

Namespaces, assemblies, solution, binaries, images, systemd units, config paths, environment variables, protocol methods and the Linux user are all renamed. Breaking: existing databases, node identities and installed units must be recreated.
This commit is contained in:
justme committed 2026-10-07 02:03:25 +08:00
1 parent 27ac7fb787
commit 2e146d4da7
309 files changed
+1565 -1572

No files matched your search

+5 -5
View File
@@ -8,8 +8,8 @@ import shlex
import subprocess
import tempfile
SCRIPT = Path(__file__).resolve().parents[1] / "packaging/update/monitor-update.sh"
with tempfile.TemporaryDirectory(prefix="monitor-updater-test-") as directory:
SCRIPT = Path(__file__).resolve().parents[1] / "packaging/update/moshiro-update.sh"
with tempfile.TemporaryDirectory(prefix="moshiro-updater-test-") as directory:
root = Path(directory)
(root / "bin").mkdir()
(root / "data/update").mkdir(parents=True)
@@ -39,8 +39,8 @@ case "${0##*/}" in
esac
""")
tool.chmod(0o755)
env = dict(os.environ, PATH=str(root / "bin") + os.pathsep + os.environ["PATH"], MONITOR_UPDATE_CONF_DIR=str(root / "conf"), TEST_LOG=str(log), TEST_MODE=str(mode))
repo = "registry.example/monitor/monitor-agent"
env = dict(os.environ, PATH=str(root / "bin") + os.pathsep + os.environ["PATH"], MOSHIRO_UPDATE_CONF_DIR=str(root / "conf"), TEST_LOG=str(log), TEST_MODE=str(mode))
repo = "registry.example/moshiro/moshiro-agent"
digest = "sha256:" + "a" * 64
image_file = root / "agent.image"
state = root / "state"
@@ -48,7 +48,7 @@ esac
auth.write_text('{"auths":{}}')
def configure(engine="podman", scope="system", policy="manual", explicit=True):
values = dict(DATA_DIR=str(root / "data"), IMAGE_REPO=repo, UNIT="monitor-agent.service", PUBKEY=str(pub), ENV_FILE=str(image_file), STATE_DIR=str(state), POLICY=policy, AUTHFILE=str(auth))
values = dict(DATA_DIR=str(root / "data"), IMAGE_REPO=repo, UNIT="moshiro-agent.service", PUBKEY=str(pub), ENV_FILE=str(image_file), STATE_DIR=str(state), POLICY=policy, AUTHFILE=str(auth))
if explicit:
values.update(ENGINE=engine, SERVICE_SCOPE=scope)
(root / "conf/agent.conf").write_text("".join(k + "=" + shlex.quote(v) + "\n" for k, v in values.items()))