#!/usr/bin/env sh

# abort on errors
set -e

# build
echo "\n=====================<< DEPLOY PROJECT VUE BY REVO >>===================";
printf "\e[33;1m%s\nĐang build Project! Vui lòng chờ ...\e[m\n \n"
yarn build

printf "\e[32mĐã build xong! Connect Git ...\e[m\n \n"
cd dist
#rm -r ./static/less

git add -A
git commit -m 'deploy'

git push -f https://daimivn@cloud.daimi.vn/plesk-git/cloud-ui.git master

cd -
printf "\n";
#curl http://devteam.mobi/sendtelegram.php?project=OPTION%20IREBAY%20FRONTEND%20:

printf "\n";

printf "\n>>        \e[32mDEPLOY SUCCESS\e[m\n"
printf "\n+ Time Deploy : ";
date "+%H:%M:%S   %d/%m/%y"
echo "\n========================<< END DEPLOY PROJECT VUE >>====================\n\n";
osascript -e 'display notification "DEPLOY CRM UI SUCCESS \n "'
