connect/deploy/prepareDeploy.sh

33 lines
1.1 KiB
Bash
Executable File

#ATTENTION
#DON'T run it in svn folder - it REMOVES files
#Copy project in another file "deploy-folder"
#cd "deploy-folder/deploy"
#run the script
## cp the file according to the deploy environment
# cp beta-properties.json ../src/assets/env-properties.json;
## uncommect from here-->
# echo -n 'Check properties service to have the url for the deployment environment!!';
# echo -n "Press key:";
# read -n1 ans
# echo -n "Pressed";
# pico ../src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
# rm -rf ../src/assets/common-assets/.svn/;
# rm -rf ../src/app/openaireLibrary/.svn/;
# cd ..; npm run build:dynamic; cd deploy;
# rm -rf ../src ../node_modules ../.idea/ ../installOpenaireLib.sh;
# echo 'Now copy to the server!'
#echo 'remove this deploy folder'
##<-- to here
#Deploy instructions!
##copy "deploy-folder" in beta.connect.openaire.eu
##coppies of previous deployments exist in "/home/argiro.kokogiannaki/connect-portal/connectYYYY-MM-DD"
##run "npm i"
##become nodejs user: "sudo su nodejs -s /bin/bash"
##go to "cd /srv/www/portal"
##cp files from "cp -r HOME_PATH/deploy-folder/* ."
##restart portal "pm2 restart connect"