mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
Port the last live namespaces adapted to the new tree (config, mime, object, resources, the wasm engines) with the temp ownership folded into tmpdir, and delete src/app/ outright: 28 legacy files gone, every behavior covered by the new suite. The render env (uris, management key, tmpdir, image cache) now travels in the lease message; the worker thread reads no config and no globals. The generated shared.js moves next to the new enums (build env, gitignore and docs follow it). Legacy tests fall with a case-by-case parity check against the new suite. Parity: api->consumer-api (7/7 same), worker->consumer+worker slices, config/plan/jobs/shell/pool suites superseded, svg fills moved to the new tree over the real module. AI-assisted-by: muse-spark-1.3-contributor
44 lines
996 B
Bash
Executable File
44 lines
996 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
export CURRENT_VERSION=$1;
|
|
export NODE_ENV=production;
|
|
|
|
pnpm install || exit 1;
|
|
pnpm run build:wasm;
|
|
|
|
WASM_SRC="resources/wasm";
|
|
WASM_SHARED="src/exporter/wasm/shared.js";
|
|
if [ ! -f "$WASM_SRC/render-wasm.wasm" ] || [ ! -f "$WASM_SHARED" ]; then
|
|
echo "ERROR: the render-wasm build did not produce:" >&2;
|
|
echo " $WASM_SRC/render-wasm.wasm" >&2;
|
|
echo " $WASM_SHARED" >&2;
|
|
exit 1;
|
|
fi
|
|
|
|
rm -rf target
|
|
|
|
# Build the application
|
|
pnpm run build;
|
|
|
|
cp pnpm-lock.yaml target/;
|
|
cp pnpm-workspace.yaml target/;
|
|
cp package.json target/;
|
|
touch target/pnpm-workspace.yaml;
|
|
|
|
mkdir -p target/$WASM_SRC;
|
|
cp "$WASM_SRC/render-wasm.js" "$WASM_SRC/render-wasm.wasm" target/$WASM_SRC/;
|
|
|
|
cat <<EOF | tee target/setup
|
|
#/usr/bin/env bash
|
|
set -e;
|
|
command -v pnpm >/dev/null || { echo "error: pnpm not found in PATH" >&2; exit 1; };
|
|
pnpm install
|
|
pnpm exec playwright install chromium;
|
|
EOF
|
|
|
|
chmod +x target/setup;
|
|
|
|
sed -i -re "s/\%version\%/$CURRENT_VERSION/g" ./target/app.js;
|