mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 11:48:38 +00:00
test: add parallels windows smoke harness
This commit is contained in:
@@ -371,6 +371,7 @@ verify_version_contains() {
|
||||
|
||||
pack_main_tgz() {
|
||||
say "Pack current main tgz"
|
||||
ensure_current_build
|
||||
local short_head pkg
|
||||
short_head="$(git rev-parse --short HEAD)"
|
||||
pkg="$(
|
||||
@@ -383,6 +384,32 @@ pack_main_tgz() {
|
||||
tar -xOf "$MAIN_TGZ_PATH" package/dist/build-info.json
|
||||
}
|
||||
|
||||
current_build_commit() {
|
||||
python3 - <<'PY'
|
||||
import json
|
||||
import pathlib
|
||||
|
||||
path = pathlib.Path("dist/build-info.json")
|
||||
if not path.exists():
|
||||
print("")
|
||||
else:
|
||||
print(json.loads(path.read_text()).get("commit", ""))
|
||||
PY
|
||||
}
|
||||
|
||||
ensure_current_build() {
|
||||
local head build_commit
|
||||
head="$(git rev-parse HEAD)"
|
||||
build_commit="$(current_build_commit)"
|
||||
if [[ "$build_commit" == "$head" ]]; then
|
||||
return
|
||||
fi
|
||||
say "Build dist for current head"
|
||||
pnpm build
|
||||
build_commit="$(current_build_commit)"
|
||||
[[ "$build_commit" == "$head" ]] || die "dist/build-info.json still does not match HEAD after build"
|
||||
}
|
||||
|
||||
start_server() {
|
||||
local host_ip="$1"
|
||||
say "Serve current main tgz on $host_ip:$HOST_PORT"
|
||||
|
||||
Reference in New Issue
Block a user