mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
fixed install-services and split install and compilation
This commit is contained in:
parent
3c791751c1
commit
3dbced021d
2 changed files with 29 additions and 15 deletions
23
server-ce/bin/compile-services
Executable file
23
server-ce/bin/compile-services
Executable file
|
@ -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
|
21
server-ce/bin/install-services
Normal file → Executable file
21
server-ce/bin/install-services
Normal file → Executable file
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue