connect-admin/deploy/prepareDeploy.sh

44 lines
1.5 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"
##run the script
## uncommect from here-->
#choose properties based on environment
# cp beta-properties.json ../src/assets/env-properties.json;
# cp production-properties.json ../src/assets/env-properties.json;
# echo -n 'Check that you have the correct properties file';
# echo -n "Press key:";
# read -n1 ans
# pico ../src/assets/env-properties.json;
# printf '\nCheck the properties file version';
# echo -n "Press key:";
# read -n1 ans
# pico ../src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
# printf '\n\nUpdate css/ js files version!';
# echo -n "Press key:";
# read -n1 ans
# echo -n "Pressed";
# pico ../src/index.html;
# echo -n 'Check Robots.txt: always add "Diasallow /"';
# echo -n "Press key:";
# read -n1 ans
# echo -n "Pressed";
# pico ../src/robots.txt;
# rm -rf ../src/assets/common-assets/.svn/;
# rm -rf ../src/app/openaireLibrary/.svn/;
# rm -rf ../src/assets/connect-assets/.svn/
# npm run build;
# echo 'Ready!';
# echo 'Now copy only "dist" to the server!'
##<-- to here
##copy "deploy-folder/dist" in demo.openaire.eu
##coppies of previous deployments exist in "/home/argiro.kokogiannaki/uoa-portal/connect-adminYYYY-MM-DD"
##become nodejs user: "sudo su nodejs -s /bin/bash"
##protal files exists in "/srv/www/portal-www"
##cp files from "cp -r /home/argiro.kokogiannaki/uoa-portal/connect-adminYYYY-MM-DD/* /srv/www/portal-www"