fix(ops): make server diagnostics release-safe

This commit is contained in:
User
2026-09-07 01:15:28 +02:00
parent cffa60772e
commit 28db30bd78
10 changed files with 297 additions and 38 deletions
+15 -1
View File
@@ -22,7 +22,16 @@ printf '%s\n' "$manifest" | grep -Eq 'Platform:[[:space:]]+linux/arm64'
temporary_output=$(mktemp -d)
trap 'rm -rf "$temporary_output"' EXIT HUP INT TERM
docker build --file "$dockerfile" --output "type=local,dest=$temporary_output" "$repository_root" >/dev/null
test_version='9.8.7-test'
test_commit='0123456789abcdef0123456789abcdef01234567'
test_build_time='2026-09-07T01:00:00+02:00'
docker build \
--build-arg "THT_VERSION=$test_version" \
--build-arg "THT_COMMIT=$test_commit" \
--build-arg "THT_BUILD_TIME=$test_build_time" \
--file "$dockerfile" \
--output "type=local,dest=$temporary_output" \
"$repository_root" >/dev/null
test -s "$temporary_output/tht-windows-amd64.exe"
test -s "$temporary_output/tht-darwin-amd64"
@@ -30,4 +39,9 @@ test -s "$temporary_output/tht-darwin-arm64"
test -s "$temporary_output/tht-linux-amd64"
test -s "$temporary_output/tht-linux-arm64"
version_json=$($temporary_output/tht-linux-amd64 version --json)
printf '%s\n' "$version_json" | grep -Fq '"version":"9.8.7-test"'
printf '%s\n' "$version_json" | grep -Fq '"commit":"0123456789abcdef0123456789abcdef01234567"'
printf '%s\n' "$version_json" | grep -Fq '"buildTime":"2026-09-07T01:00:00+02:00"'
echo "tht build contract passed."