#!/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" <