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

+9 -9
View File
@@ -9,18 +9,18 @@ rid="${2:?usage: publish.sh <agent|probe|backend|fleet-enroll> <rid>}"
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
case "$project" in
agent) csproj="backend/agent/src/Monitor.Agent" ;;
probe) csproj="backend/probe/src/Monitor.Probe" ;;
backend) csproj="backend/src/Monitor.Backend" ;;
agent) csproj="backend/agent/src/MoShiro.Agent" ;;
probe) csproj="backend/probe/src/MoShiro.Probe" ;;
backend) csproj="backend/src/MoShiro.Backend" ;;
fleet-enroll) csproj="backend/fleet/tools/fleet-enroll" ;;
*) echo "unknown project: $project" >&2; exit 2 ;;
esac
# 构建信息(程序里显示的 tag、提交、构建时间):没在 git 仓库里就留空
export MONITOR_TAG="${MONITOR_TAG:-$(git -C "$root" describe --tags --always --dirty 2>/dev/null || true)}"
export MONITOR_COMMIT="${MONITOR_COMMIT:-$(git -C "$root" rev-parse --short=10 HEAD 2>/dev/null || true)}"
export MONITOR_BUILT_AT="${MONITOR_BUILT_AT:-$(date -u +%Y-%m-%dT%H:%M:%SZ)}"
build_env=(-e MONITOR_TAG -e MONITOR_COMMIT -e MONITOR_BUILT_AT)
export MOSHIRO_TAG="${MOSHIRO_TAG:-$(git -C "$root" describe --tags --always --dirty 2>/dev/null || true)}"
export MOSHIRO_COMMIT="${MOSHIRO_COMMIT:-$(git -C "$root" rev-parse --short=10 HEAD 2>/dev/null || true)}"
export MOSHIRO_BUILT_AT="${MOSHIRO_BUILT_AT:-$(date -u +%Y-%m-%dT%H:%M:%SZ)}"
build_env=(-e MOSHIRO_TAG -e MOSHIRO_COMMIT -e MOSHIRO_BUILT_AT)
out="backend/artifacts/publish/$project/$rid"
publish_options=()
@@ -32,11 +32,11 @@ args=(publish "$csproj" -c Release -r "$rid" -p:PublishAot=true -p:DebugType=non
case "$rid" in
linux-musl-x64)
# SDK 镜像的版本可以比 global.json 新(rollForward = latestFeature)
docker run --rm "${build_env[@]}" -v "$root:/src" -v monitor-nuget:/root/.nuget -v "monitor-artifacts-$rid:/artifacts" -w /src \
docker run --rm "${build_env[@]}" -v "$root:/src" -v moshiro-nuget:/root/.nuget -v "moshiro-artifacts-$rid:/artifacts" -w /src \
mcr.microsoft.com/dotnet/sdk:10.0-alpine-aot dotnet "${args[@]}"
;;
linux-x64)
docker run --rm "${build_env[@]}" -v "$root:/src" -v monitor-nuget:/root/.nuget -v "monitor-artifacts-$rid:/artifacts" -w /src mcr.microsoft.com/dotnet/sdk:10.0-noble-aot dotnet "${args[@]}"
docker run --rm "${build_env[@]}" -v "$root:/src" -v moshiro-nuget:/root/.nuget -v "moshiro-artifacts-$rid:/artifacts" -w /src mcr.microsoft.com/dotnet/sdk:10.0-noble-aot dotnet "${args[@]}"
;;
linux-musl-arm64|linux-arm64)
echo "$rid needs an arm64 Alpine builder (native or qemu): run this script on an arm64 host or in CI" >&2