Просмотр исходного кода

fixed install-services and split install and compilation

mserranom 7 лет назад
Родитель
Сommit
3dbced021d
2 измененных файлов с 29 добавлено и 15 удалено
  1. 23 0
      server-ce/bin/compile-services
  2. 6 15
      server-ce/bin/install-services

+ 23 - 0
server-ce/bin/compile-services

@@ -0,0 +1,23 @@
+#! env bash
+
+set -ex
+
+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

+ 6 - 15
server-ce/bin/install-services

@@ -1,25 +1,16 @@
 #! env bash
 
-[ -z "`type -t nvm`" ] && cat <<EOF
-
-==========================================================
-== NVM not installed, you should consider installing it ==
-==========================================================
-
-EOF
-
+set -ex
 
 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 Node from .nvmrc"
+		nvm install && nvm use
+		echo "Installing service $service"
+		npm install --quiet
 		popd
 	done
+