Browse Source

Merge pull request #629 from overleaf/msm-fix-build

Fix install-services scripts
Miguel Serrano 7 years ago
parent
commit
0424a71b47
3 changed files with 28 additions and 16 deletions
  1. 1 1
      .nvmrc
  2. 23 0
      bin/compile-services
  3. 4 15
      bin/install-services

+ 1 - 1
.nvmrc

@@ -1 +1 @@
-6.11.2
+10.16.0

+ 23 - 0
bin/compile-services

@@ -0,0 +1,23 @@
+#! env bash
+
+set -e
+
+grep 'name:' config/services.js | \
+	sed 's/.*name: "\(.*\)",/\1/' | \
+	while read service
+	do
+		pushd $service
+		echo "Compiling Service $service"
+		case $service in 
+			web)
+				make compile_full
+				;;
+			chat)
+				echo "$service doesn't require a compilation"
+				;;	
+			*)
+				npm run compile:all
+				;;
+		esac	
+		popd
+	done

+ 4 - 15
bin/install-services

@@ -1,25 +1,14 @@
 #! env bash
 
-[ -z "`type -t nvm`" ] && cat <<EOF
-
-==========================================================
-== NVM not installed, you should consider installing it ==
-==========================================================
-
-EOF
-
+set -e
 
 grep 'name:' config/services.js | \
 	sed 's/.*name: "\(.*\)",/\1/' | \
 	while read service
 	do
 		pushd $service
-		echo "Installing Service $service"
-		echo '  installing Node'
-		type -t nvm && nvm install
-		type -t nvm && nvm use
-		echo '  installing Dependencies'
-		npm install
-		grunt install
+		echo "Installing service $service"
+		npm install --quiet
 		popd
 	done
+