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

49 lines
1.4 KiB
Bash

#!/usr/bin/env bash
# One zip: latest React Q-App — production dist/ + full source + configs (no node_modules).
# Use dist/ alone for Qortal WEBSITE upload, or keep the whole bundle for backup / rebuild.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
npm install
npm run build
if [[ ! -f dist/index.html ]]; then
echo "error: dist/index.html missing after build" >&2
exit 1
fi
DATE="$(date +%Y%m%d)"
NAME="My-Personal-Website-Builder-React-Q-App-${DATE}"
STAGE="${ROOT}/.release-tmp-$$"
OUT="${ROOT}/${NAME}.zip"
rm -f "$OUT"
rm -rf "$STAGE"
mkdir -p "${STAGE}/${NAME}"
cp -a dist "${STAGE}/${NAME}/"
cp -a src public scripts "${STAGE}/${NAME}/"
for f in package.json package-lock.json vite.config.ts tsconfig.json index.html style.css; do
if [[ -f "$ROOT/$f" ]]; then
cp -a "$ROOT/$f" "${STAGE}/${NAME}/"
fi
done
cat > "${STAGE}/${NAME}/RELEASE-README.txt" <<EOF
My Personal Website Builder — React Q-App (build date ${DATE})
dist/ Fresh Vite build — deploy this tree as a Qortal WEBSITE
(or zip only the contents of dist/ as website.zip in the Hub).
src/ React + TypeScript source
public/ Copied into dist at build (manifest, zip-store.js, favicon, …)
scripts/ bundle-zip-store, make-zip, release helpers
Rebuild: npm install && npm run build
Preview: npx --yes serve dist
EOF
( cd "$STAGE" && zip -r -9 "$OUT" "$NAME" )
rm -rf "$STAGE"
echo "Created: $OUT"
ls -la "$OUT"