DocSpace-client/build/install/common/build-backend.sh
Sergey Kirichenko 2a1883977c
Add feature for migration db in docker (#740)
* Add migration runner build image

* Add path for migration.runner build

* Modifiex build path migration.runner

* Fix migration-runner.yml

* Modify reference format for dockerhub

* Fix

* Check build reference format

* Fix build

* Modify migration runner  build path

Co-authored-by: Alexey Golubev <alexey.golubev@onlyoffice.com>
2022-07-27 16:48:00 +03:00

59 lines
1.5 KiB
Bash

#!/bin/bash
SRC_PATH="/AppServer"
ARGS=""
while [ "$1" != "" ]; do
case $1 in
-sp | --srcpath )
if [ "$2" != "" ]; then
SRC_PATH=$2
shift
fi
;;
-ar | --arguments )
if [ "$2" != "" ]; then
ARGS=$2
shift
fi
;;
-? | -h | --help )
echo " Usage: bash build-backend.sh [PARAMETER] [[PARAMETER], ...]"
echo " Parameters:"
echo " -sp, --srcpath path to AppServer root directory"
echo " -ar, --arguments additional arguments publish the .NET runtime with your application"
echo " -?, -h, --help this help"
echo " Examples"
echo " bash build-backend.sh -sp /app/AppServer"
exit 0
;;
* )
echo "Unknown parameter $1" 1>&2
exit 1
;;
esac
shift
done
echo "== BACK-END-BUILD =="
cd ${SRC_PATH}
dotnet build ASC.Web.slnf ${ARGS}
dotnet build ASC.Migrations.sln -o ${SRC_PATH}/ASC.Migration.Runner/service/
# Array of names backend services in directory common (Nodejs)
services_name_backend_nodejs=()
services_name_backend_nodejs+=(ASC.UrlShortener)
services_name_backend_nodejs+=(ASC.Socket.IO)
services_name_backend_nodejs+=(ASC.SsoAuth)
# Build backend services (Nodejs)
for i in ${!services_name_backend_nodejs[@]}; do
echo "== Build ${services_name_backend_nodejs[$i]} project =="
yarn install --cwd common/${services_name_backend_nodejs[$i]} --frozen-lockfile
done