Packaging Tests
This commit is contained in:
@@ -7,6 +7,7 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
SEEDER="$ROOT/packages/bare-os-seeder"
|
||||
BOOTER="$ROOT/packages/bare-os-booter"
|
||||
PROTO="$ROOT/packages/bare-os-protocol"
|
||||
BARE_SSH2="$ROOT/packages/bare-os-openssh/vendor/bare-ssh2"
|
||||
|
||||
log() {
|
||||
printf '\n%s\n' "$*"
|
||||
@@ -22,7 +23,7 @@ ensure_root_deps() {
|
||||
# Pear mirrors from each package dir. npm workspaces often leave a *partial* `node_modules/`
|
||||
# under the package (e.g. only workspace copies) while the rest hoists to the repo root — Pear
|
||||
# then stages without `hyperswarm`, etc. Always rebuild flat symlinks from root (same as
|
||||
# `npm run os:seeder` / ensure-pear-node-modules), then overlay the workspace protocol package.
|
||||
# `npm run os:seeder` / ensure-pear-node-modules), then overlay workspace packages Pear must not resolve via symlinks outside the app dir.
|
||||
prepare_pkg_for_pear() {
|
||||
local pkg="$1"
|
||||
local nm="$pkg/node_modules"
|
||||
@@ -32,6 +33,11 @@ prepare_pkg_for_pear() {
|
||||
rm -rf "$nm/bare-os-protocol"
|
||||
log "Copying bare-os-protocol into $(basename "$pkg")/node_modules"
|
||||
cp -R "$PROTO" "$nm/bare-os-protocol"
|
||||
if [[ "$pkg" == "$BOOTER" ]]; then
|
||||
rm -rf "$nm/bare-ssh2"
|
||||
log "Copying vendored bare-ssh2 into $(basename "$pkg")/node_modules"
|
||||
cp -R "$BARE_SSH2" "$nm/bare-ssh2"
|
||||
fi
|
||||
}
|
||||
|
||||
log "Repo root: $ROOT"
|
||||
|
||||
Reference in New Issue
Block a user