move call to install deps down the script, after git pull to have always the correct version

This commit is contained in:
einhornimmond 2025-05-20 12:30:12 +02:00
parent aebeb6ad7c
commit 9ebd754942

View File

@ -2,8 +2,6 @@
# stop if something fails
set -euo pipefail
source ./install-missing-deps.sh
# check for parameter
FAST_MODE=false
POSITIONAL_ARGS=()
@ -44,18 +42,6 @@ PROJECT_ROOT=$SCRIPT_DIR/../..
NGINX_CONFIG_DIR=$SCRIPT_DIR/nginx/sites-available
set +o allexport
# enable nvm
export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
install_nvm() {
nvm install
nvm use
nvm alias default
npm i -g yarn pm2
pm2 startup
}
# make sure correct node version is installed
nvm use || install_nvm
# NOTE: all config values will be in process.env when starting
# the services and will therefore take precedence over the .env
@ -180,6 +166,9 @@ git checkout $BRANCH_NAME
git pull
export BUILD_COMMIT="$(git rev-parse HEAD)"
# install missing dependencies
source ./install-missing-deps.sh
# Generate gradido.conf from template
# *** 1st prepare for each apiversion the federation conf for nginx from federation-template
# *** set FEDERATION_PORT from FEDERATION_COMMUNITY_APIS and create gradido-federation.conf file