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 0424a71b47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 16 deletions

2
.nvmrc
View file

@ -1 +1 @@
6.11.2 10.16.0

23
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
bin/install-services Normal file → Executable file
View file

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