#!/usr/bin/bash set -e -u -o pipefail # Build frontend cd frontend npm install npm run build (cd dist/assets && mv *.js ucs.js && mv *.css ucs.css) cd .. # Build backend cd backend npm install cp ../frontend/dist/assets/* public/ # Bundle PACKAGE="ucs-$(cat package.json | jq -r .version).tar.gz" tar czvf "$PACKAGE" package.json package-lock.json src/ node_modules/ public/ cd .. mv backend/"$PACKAGE" . echo "$PACKAGE created."