Project

General

Profile

1
##ATTENTION
2
##DON'T run it in svn folder - it *REMOVES* files
3
##Copy project in another file "deploy-folder"
4
##cd "deploy-folder"
5
##run the script
6

    
7
## uncommect from here-->
8
#choose properties based on environment
9
# cp beta-properties.json  ../src/assets/env-properties.json;
10
# cp production-properties.json  ../src/assets/env-properties.json;
11

    
12

    
13
# echo -n 'Check that you have the correct properties file';
14
# echo -n "Press key:";
15
# read -n1 ans
16
# pico ../src/assets/env-properties.json;
17
# printf  '\nCheck the properties file version';
18
# echo -n "Press key:";
19
# read -n1 ans
20
# pico ../src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
21
# printf  '\n\nUpdate css/ js files version!';
22
# echo -n "Press key:";
23
# read -n1 ans
24
# echo -n "Pressed";
25
# pico ../src/index.html;
26
# echo -n 'Check Robots.txt: always add  "Diasallow /"';
27
# echo -n "Press key:";
28
# read -n1 ans
29
# echo -n "Pressed";
30
# pico ../src/robots.txt;
31
# rm -rf ../src/assets/common-assets/.svn/;
32
# rm -rf ../src/app/openaireLibrary/.svn/;
33
# rm -rf ../src/assets/connect-assets/.svn/
34
# npm run build;
35
# echo 'Ready!';
36
# echo 'Now copy only "dist" to the server!'
37
##<-- to here
38

    
39
##copy "deploy-folder/dist" in demo.openaire.eu
40
##coppies of previous deployments exist in  "/home/argiro.kokogiannaki/uoa-portal/connect-adminYYYY-MM-DD"
41
##become nodejs user: "sudo su nodejs -s /bin/bash"
42
##protal files exists in "/srv/www/portal-www"
43
##cp files from "cp -r /home/argiro.kokogiannaki/uoa-portal/connect-adminYYYY-MM-DD/* /srv/www/portal-www"
(2-2/3)