Browse Source

Fix warnings

Bob Mottram 8 years ago
parent
commit
e0021a05a6
2 changed files with 21 additions and 3 deletions
  1. 20
    2
      src/freedombone-app-turtl
  2. 1
    1
      src/freedombone-utils-nodejs

+ 20
- 2
src/freedombone-app-turtl View File

@@ -84,6 +84,8 @@ function install_interactive_turtl {
84 84
     else
85 85
         function_check interactive_site_details
86 86
         interactive_site_details "turtl" "TURTL_DOMAIN_NAME" "TURTL_CODE"
87
+        write_config_param "API_TURTL_DOMAIN_NAME" "api.${TURTL_DOMAIN_NAME}"
88
+        write_config_param "API_TURTL_CODE" "${TURTL_CODE}"
87 89
     fi
88 90
     APP_INSTALLED=1
89 91
 }
@@ -124,7 +126,12 @@ function upgrade_turtl {
124 126
     set_repo_commit $TURTL_BASE_DIR/api "turtl api commit" "$TURTL_API_COMMIT" $TURTL_API_REPO
125 127
     nginx_dissite $TURTL_DOMAIN_NAME
126 128
     cd /var/www/$TURTL_DOMAIN_NAME/htdocs
127
-    npm install
129
+    rm -rf node_modules npm-shrinkwrap.json
130
+    npm install uglify@0.1.5 --no-optional
131
+    npm install minimatch@3.0.2 --no-optional
132
+    npm install --no-optional
133
+    sed -i 's|{config,controllers,handlers,locales,library,models,turtl}|.|g' Makefile
134
+    sed -i 's|tests/{data,tests}|tests|g' Makefile
128 135
     make clean
129 136
     make
130 137
     chown -R turtl:turtl $TURTL_BASE_DIR
@@ -694,8 +701,19 @@ function install_turtl_app {
694 701
     set_completion_param "turtl domain" "$TURTL_DOMAIN_NAME"
695 702
 
696 703
     cd /var/www/$TURTL_DOMAIN_NAME/htdocs
697
-    npm install
704
+    sed -i 's|GPLv3|GPL-3.0|g' package.json
705
+    sed -i "/license/a \"repository\": \"$TURTL_REPO\"," package.json
706
+    rm -rf node_modules npm-shrinkwrap.json
707
+    npm install uglify@0.1.5 --no-optional
708
+    npm install minimatch@3.0.2 --no-optional
709
+    npm install --no-optional
710
+
711
+    sed -i 's|{config,controllers,handlers,locales,library,models,turtl}|.|g' Makefile
712
+    sed -i 's|tests/{data,tests}|tests|g' Makefile
713
+
714
+    make clean
698 715
     make
716
+
699 717
     chown -R turtl:turtl /var/www/$TURTL_DOMAIN_NAME/htdocs
700 718
 
701 719
     function_check create_site_certificate

+ 1
- 1
src/freedombone-utils-nodejs View File

@@ -37,7 +37,7 @@ VARIANTS='mesh'
37 37
 # have specifically the correct versions
38 38
 NODEJS_VERSION='6.9.0'
39 39
 NODEJS_N_VERSION='2.1.4'
40
-NPM_VERSION='4.0.2'
40
+NPM_VERSION='4.0.5'
41 41
 
42 42
 # This file keeps track of the apps needing nodejs
43 43
 # so that it can be removed if tere are no apps which need it