mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:20:44 +00:00
test: harden parallels package smokes
This commit is contained in:
@@ -511,6 +511,11 @@ ensure_current_build() {
|
|||||||
[[ "$build_commit" == "$head" ]] || die "dist/build-info.json still does not match HEAD after build"
|
[[ "$build_commit" == "$head" ]] || die "dist/build-info.json still does not match HEAD after build"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
write_package_dist_inventory() {
|
||||||
|
node --import tsx --input-type=module --eval \
|
||||||
|
'import { writePackageDistInventory } from "./src/infra/package-dist-inventory.ts"; await writePackageDistInventory(process.cwd());'
|
||||||
|
}
|
||||||
|
|
||||||
extract_package_version_from_tgz() {
|
extract_package_version_from_tgz() {
|
||||||
tar -xOf "$1" package/package.json | python3 -c 'import json, sys; print(json.load(sys.stdin)["version"])'
|
tar -xOf "$1" package/package.json | python3 -c 'import json, sys; print(json.load(sys.stdin)["version"])'
|
||||||
}
|
}
|
||||||
@@ -531,6 +536,7 @@ pack_main_tgz() {
|
|||||||
fi
|
fi
|
||||||
say "Pack current main tgz"
|
say "Pack current main tgz"
|
||||||
ensure_current_build
|
ensure_current_build
|
||||||
|
write_package_dist_inventory
|
||||||
short_head="$(git rev-parse --short HEAD)"
|
short_head="$(git rev-parse --short HEAD)"
|
||||||
pkg="$(
|
pkg="$(
|
||||||
npm pack --ignore-scripts --json --pack-destination "$MAIN_TGZ_DIR" \
|
npm pack --ignore-scripts --json --pack-destination "$MAIN_TGZ_DIR" \
|
||||||
|
|||||||
@@ -1156,6 +1156,7 @@ pack_main_tgz() {
|
|||||||
fi
|
fi
|
||||||
say "Pack current main tgz"
|
say "Pack current main tgz"
|
||||||
ensure_current_build
|
ensure_current_build
|
||||||
|
write_package_dist_inventory
|
||||||
stage_pack_runtime_deps
|
stage_pack_runtime_deps
|
||||||
short_head="$(git rev-parse --short HEAD)"
|
short_head="$(git rev-parse --short HEAD)"
|
||||||
pkg="$(
|
pkg="$(
|
||||||
@@ -1238,6 +1239,11 @@ ensure_current_build() {
|
|||||||
current_control_ui_ready || die "dist/control-ui/index.html missing after ui build"
|
current_control_ui_ready || die "dist/control-ui/index.html missing after ui build"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
write_package_dist_inventory() {
|
||||||
|
node --import tsx --input-type=module --eval \
|
||||||
|
'import { writePackageDistInventory } from "./src/infra/package-dist-inventory.ts"; await writePackageDistInventory(process.cwd());'
|
||||||
|
}
|
||||||
|
|
||||||
stage_pack_runtime_deps() {
|
stage_pack_runtime_deps() {
|
||||||
node scripts/stage-bundled-plugin-runtime-deps.mjs
|
node scripts/stage-bundled-plugin-runtime-deps.mjs
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -332,11 +332,17 @@ ensure_current_build() {
|
|||||||
pnpm build
|
pnpm build
|
||||||
}
|
}
|
||||||
|
|
||||||
|
write_package_dist_inventory() {
|
||||||
|
node --import tsx --input-type=module --eval \
|
||||||
|
'import { writePackageDistInventory } from "./src/infra/package-dist-inventory.ts"; await writePackageDistInventory(process.cwd());'
|
||||||
|
}
|
||||||
|
|
||||||
pack_main_tgz() {
|
pack_main_tgz() {
|
||||||
local pkg
|
local pkg
|
||||||
CURRENT_HEAD="$(git rev-parse HEAD)"
|
CURRENT_HEAD="$(git rev-parse HEAD)"
|
||||||
CURRENT_HEAD_SHORT="$(git rev-parse --short=7 HEAD)"
|
CURRENT_HEAD_SHORT="$(git rev-parse --short=7 HEAD)"
|
||||||
ensure_current_build
|
ensure_current_build
|
||||||
|
write_package_dist_inventory
|
||||||
pkg="$(
|
pkg="$(
|
||||||
npm pack --ignore-scripts --json --pack-destination "$MAIN_TGZ_DIR" \
|
npm pack --ignore-scripts --json --pack-destination "$MAIN_TGZ_DIR" \
|
||||||
| "$PYTHON_BIN" -c 'import json, sys; data = json.load(sys.stdin); print(data[-1]["filename"])'
|
| "$PYTHON_BIN" -c 'import json, sys; data = json.load(sys.stdin); print(data[-1]["filename"])'
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ TIMEOUT_ONBOARD_S=240
|
|||||||
TIMEOUT_ONBOARD_PHASE_S=$((TIMEOUT_ONBOARD_S + 120))
|
TIMEOUT_ONBOARD_PHASE_S=$((TIMEOUT_ONBOARD_S + 120))
|
||||||
# verify_gateway_reachable runs six 30s probes plus short retry sleeps.
|
# verify_gateway_reachable runs six 30s probes plus short retry sleeps.
|
||||||
TIMEOUT_GATEWAY_S=240
|
TIMEOUT_GATEWAY_S=240
|
||||||
TIMEOUT_AGENT_S=180
|
TIMEOUT_AGENT_S=360
|
||||||
|
|
||||||
FRESH_MAIN_STATUS="skip"
|
FRESH_MAIN_STATUS="skip"
|
||||||
FRESH_MAIN_VERSION="skip"
|
FRESH_MAIN_VERSION="skip"
|
||||||
@@ -898,6 +898,11 @@ ensure_current_build() {
|
|||||||
[[ "$build_commit" == "$head" ]] || die "dist/build-info.json still does not match HEAD after build"
|
[[ "$build_commit" == "$head" ]] || die "dist/build-info.json still does not match HEAD after build"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
write_package_dist_inventory() {
|
||||||
|
node --import tsx --input-type=module --eval \
|
||||||
|
'import { writePackageDistInventory } from "./src/infra/package-dist-inventory.ts"; await writePackageDistInventory(process.cwd());'
|
||||||
|
}
|
||||||
|
|
||||||
ensure_guest_git() {
|
ensure_guest_git() {
|
||||||
local host_ip="$1"
|
local host_ip="$1"
|
||||||
local mingit_url mingit_url_q mingit_name_q
|
local mingit_url mingit_url_q mingit_name_q
|
||||||
@@ -957,6 +962,7 @@ pack_main_tgz() {
|
|||||||
fi
|
fi
|
||||||
say "Pack current main tgz"
|
say "Pack current main tgz"
|
||||||
ensure_current_build
|
ensure_current_build
|
||||||
|
write_package_dist_inventory
|
||||||
short_head="$(git rev-parse --short HEAD)"
|
short_head="$(git rev-parse --short HEAD)"
|
||||||
pkg="$(
|
pkg="$(
|
||||||
npm pack --ignore-scripts --json --pack-destination "$MAIN_TGZ_DIR" \
|
npm pack --ignore-scripts --json --pack-destination "$MAIN_TGZ_DIR" \
|
||||||
|
|||||||
Reference in New Issue
Block a user