Prune non-amd64 prebuilds from Bare bundle
This commit is contained in:
@@ -17,6 +17,16 @@ rm -rf "${BUNDLE_DIR}" "${OUT_DIR}/jarvis-qvac-bare-${PLATFORM}.tar.gz"
|
||||
mkdir -p "${BUNDLE_DIR}"
|
||||
tar --exclude='.git' --exclude='./.agents' --exclude='./.codex' --exclude='./dist' --exclude='./vendor/agent-harness/node_modules' --exclude='*/__pycache__' --exclude='*.pyc' -cf - -C "${ROOT_DIR}" . | tar -xf - -C "${BUNDLE_DIR}"
|
||||
cp -a "${ROOT_DIR}/node_modules" "${BUNDLE_DIR}/"
|
||||
# QVAC publishes one package containing native prebuilds for every supported
|
||||
# platform. The rolling asset is architecture-specific: retain all Linux x64
|
||||
# GPU variants, and remove arm64/mobile/Apple/Windows payloads before packing.
|
||||
find "${BUNDLE_DIR}/node_modules" -type d -name prebuilds -prune -print0 | while IFS= read -r -d '' prebuilds; do
|
||||
find "${prebuilds}" -mindepth 1 -maxdepth 1 -type d ! -name "${PLATFORM}" -exec rm -rf {} +
|
||||
done
|
||||
find "${BUNDLE_DIR}/node_modules" -maxdepth 1 -type d -name 'bare-runtime-*' ! -name "bare-runtime-${PLATFORM}" -exec rm -rf {} +
|
||||
if [[ -d "${BUNDLE_DIR}/node_modules/@esbuild" ]]; then
|
||||
find "${BUNDLE_DIR}/node_modules/@esbuild" -mindepth 1 -maxdepth 1 -type d ! -name 'linux-x64' -exec rm -rf {} +
|
||||
fi
|
||||
tar -C "${OUT_DIR}" -czf "${OUT_DIR}/jarvis-qvac-bare-${PLATFORM}.tar.gz" "jarvis-qvac-bare-${PLATFORM}"
|
||||
rm -rf "${BUNDLE_DIR}"
|
||||
echo "${OUT_DIR}/jarvis-qvac-bare-${PLATFORM}.tar.gz"
|
||||
|
||||
Reference in New Issue
Block a user