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

Fix install-services scripts
This commit is contained in:
Miguel Serrano 2019-08-12 13:31:24 +02:00 committed by GitHub
commit 7b0bbc7eb9
3 changed files with 28 additions and 16 deletions

View file

@ -1 +1 @@
6.11.2
10.16.0

23
server-ce/bin/compile-services Executable file
View file

@ -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

19
server-ce/bin/install-services Normal file → Executable file
View file

@ -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