refactor!: rename the project from Monitor to MoShiro

Namespaces, assemblies, projects and directories, the solution, binaries,
images, systemd units, config paths, environment variables, protocol method
names, the media type and the raw chunk magic all move to MoShiro/moshiro.
Existing data and deployments are not compatible and must be recreated.
Also fix the architecture tests after the solution layout change and make
the update tests independent of their order.
This commit is contained in:
justme committed 2026-10-07 01:49:04 +08:00
1 parent 17b35223aa
commit 83e5120377
309 files changed
+1505 -1499

No files matched your search

+21 -21
View File
@@ -16,7 +16,7 @@ gitea_host="${gitea_base#https://}"
gitea_host="${gitea_host#http://}"
gitea_host="${gitea_host%%/*}"
gitea_host="${gitea_host%%:*}"
api="$gitea_base/api/v1/repos/justme/MyMonitor"
api="$gitea_base/api/v1/repos/justme/MoShiro"
tmp="$(mktemp -d)"
netrc="$tmp/netrc"
release_json="$tmp/release.json"
@@ -26,8 +26,8 @@ printf 'machine %s login justme password %s\n' "$gitea_host" "$GITEA_TOKEN" > "$
chmod 600 "$netrc"
trap 'rm -rf "$tmp"' EXIT
release_body="Agent and Probe builds: Linux glibc and musl (x64, arm64), macOS (x64, arm64), and Windows (x64, arm64). Linux glibc Agent and Probe OCI images: registry.oeo.one/monitor/monitor-agent:$version and registry.oeo.one/monitor/monitor-probe:$version (linux/amd64 and linux/arm64). Backend OCI image: registry.oeo.one/monitor/monitor-backend:$version (linux/amd64 and linux/arm64). macOS binaries are not Developer ID signed or notarized."
payload="$(printf '{"tag_name":"%s","target_commitish":"%s","name":"MyMonitor %s","body":"%s","draft":false,"prerelease":false}' \
release_body="Agent and Probe builds: Linux glibc and musl (x64, arm64), macOS (x64, arm64), and Windows (x64, arm64). Linux glibc Agent and Probe OCI images: registry.oeo.one/moshiro/moshiro-agent:$version and registry.oeo.one/moshiro/moshiro-probe:$version (linux/amd64 and linux/arm64). Backend OCI image: registry.oeo.one/moshiro/moshiro-backend:$version (linux/amd64 and linux/arm64). macOS binaries are not Developer ID signed or notarized."
payload="$(printf '{"tag_name":"%s","target_commitish":"%s","name":"MoShiro %s","body":"%s","draft":false,"prerelease":false}' \
"$tag" "${CI_COMMIT_SHA:-}" "$tag" "$release_body")"
release_status="$(curl --silent --show-error --retry 3 --netrc-file "$netrc" \
--output "$release_json" --write-out '%{http_code}' "$api/releases/tags/$tag")"
@@ -60,28 +60,28 @@ curl --fail-with-body --silent --show-error --retry 3 --netrc-file "$netrc" \
"$api/releases/$release_id/assets" -o "$assets_json"
assets=(
"monitor-agent-v$version-linux-amd64.tar.gz"
"monitor-agent-v$version-linux-arm64.tar.gz"
"monitor-probe-v$version-linux-amd64.tar.gz"
"monitor-probe-v$version-linux-arm64.tar.gz"
"monitor-agent-v$version-linux-musl-amd64.tar.gz"
"monitor-probe-v$version-linux-musl-amd64.tar.gz"
"monitor-agent-v$version-linux-musl-arm64.tar.gz"
"monitor-probe-v$version-linux-musl-arm64.tar.gz"
"monitor-agent-v$version-macos-x64.tar.gz"
"monitor-probe-v$version-macos-x64.tar.gz"
"monitor-agent-v$version-macos-arm64.tar.gz"
"monitor-probe-v$version-macos-arm64.tar.gz"
"monitor-agent-v$version-windows-amd64.zip"
"monitor-agent-v$version-windows-arm64.zip"
"monitor-probe-v$version-windows-amd64.zip"
"monitor-probe-v$version-windows-arm64.zip"
"moshiro-agent-v$version-linux-amd64.tar.gz"
"moshiro-agent-v$version-linux-arm64.tar.gz"
"moshiro-probe-v$version-linux-amd64.tar.gz"
"moshiro-probe-v$version-linux-arm64.tar.gz"
"moshiro-agent-v$version-linux-musl-amd64.tar.gz"
"moshiro-probe-v$version-linux-musl-amd64.tar.gz"
"moshiro-agent-v$version-linux-musl-arm64.tar.gz"
"moshiro-probe-v$version-linux-musl-arm64.tar.gz"
"moshiro-agent-v$version-macos-x64.tar.gz"
"moshiro-probe-v$version-macos-x64.tar.gz"
"moshiro-agent-v$version-macos-arm64.tar.gz"
"moshiro-probe-v$version-macos-arm64.tar.gz"
"moshiro-agent-v$version-windows-amd64.zip"
"moshiro-agent-v$version-windows-arm64.zip"
"moshiro-probe-v$version-windows-amd64.zip"
"moshiro-probe-v$version-windows-arm64.zip"
)
upload_release_asset() {
local name="$1" file="$tmp/$1" upload_response="$tmp/$1.upload.json" status
curl --fail-with-body --silent --show-error --retry 3 --netrc-file "$netrc" \
"$gitea_base/api/packages/justme/generic/monitor-node/$version/$name" -o "$file"
"$gitea_base/api/packages/justme/generic/moshiro-node/$version/$name" -o "$file"
status="$(curl --silent --show-error --retry 3 --netrc-file "$netrc" \
--request POST --header 'Content-Type: application/octet-stream' --data-binary "@$file" \
--output "$upload_response" --write-out '%{http_code}' \
@@ -111,4 +111,4 @@ for pid in "${pids[@]}"; do
wait "$pid"
done
echo "published Gitea Release $tag: https://git.oeo.one/justme/MyMonitor/releases/tag/$tag"
echo "published Gitea Release $tag: https://git.oeo.one/justme/MoShiro/releases/tag/$tag"