Files
Simon James b54a3139c7 Initial commit: Qortal Web Builder monorepo.
Includes QWB, Qortal Web, and Q-Shops Q-Apps with shared packages and build scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 12:17:29 +00:00

27 lines
695 B
Bash

#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
APP="$ROOT/qortal-web-app"
if [[ ! -f "$APP/package.json" ]]; then
echo "Missing qortal-web-app/package.json" >&2
exit 1
fi
VERSION="$(node -e "console.log(JSON.parse(require('fs').readFileSync(process.argv[1],'utf8')).version)" "$APP/package.json")"
DATE="$(date +%Y%m%d)"
OUT="${ROOT}/Qortal-Web-v${VERSION}-${DATE}.zip"
npm --prefix "$APP" ci 2>/dev/null || npm --prefix "$APP" install
npm --prefix "$APP" run build
T="$(mktemp -d "${TMPDIR:-/tmp}/qortal-web-zip-XXXX")"
trap 'rm -rf "$T"' EXIT
cp -a "$APP/dist/." "$T"/
rm -f "$OUT"
( cd "$T" && zip -r -9 "$OUT" . )
echo "Created: $OUT"
ls -la "$OUT"