#!/bin/bash
pwd

yarn
npm run build:prod

rm -rf ~/project/examcloud/static/examcloud-admin-web/dist/*
mkdir -p ~/project/examcloud/static/examcloud-admin-web
cp -r  dist ~/project/examcloud/static/examcloud-admin-web/

rm -rf ~/packages/static/examcloud-admin-web/*
mkdir -p ~/packages/static/examcloud-admin-web
cp -r dist ~/packages/static/examcloud-admin-web/

cd ~/packages/static/
rm -rf examcloud-admin-web.tar.gz
tar -zcvf examcloud-admin-web.tar.gz examcloud-admin-web/

