2021-04-06 11:28:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
SRC_PATH="/AppServer"
|
2021-04-14 12:45:16 +00:00
|
|
|
ARGS=""
|
2021-04-06 11:28:12 +00:00
|
|
|
|
|
|
|
while [ "$1" != "" ]; do
|
|
|
|
case $1 in
|
|
|
|
|
|
|
|
-sp | --srcpath )
|
|
|
|
if [ "$2" != "" ]; then
|
2021-04-14 12:45:16 +00:00
|
|
|
SRC_PATH=$2
|
|
|
|
shift
|
|
|
|
fi
|
2021-04-06 11:28:12 +00:00
|
|
|
;;
|
|
|
|
|
2021-04-14 12:45:16 +00:00
|
|
|
-ar | --arguments )
|
|
|
|
if [ "$2" != "" ]; then
|
|
|
|
ARGS=$2
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
2021-04-06 11:28:12 +00:00
|
|
|
-? | -h | --help )
|
|
|
|
echo " Usage: bash build-backend.sh [PARAMETER] [[PARAMETER], ...]"
|
|
|
|
echo " Parameters:"
|
|
|
|
echo " -sp, --srcpath path to AppServer root directory"
|
2021-04-14 12:45:16 +00:00
|
|
|
echo " -ar, --arguments additional arguments publish the .NET runtime with your application"
|
2021-04-06 11:28:12 +00:00
|
|
|
echo " -?, -h, --help this help"
|
|
|
|
echo " Examples"
|
|
|
|
echo " bash build-backend.sh -sp /app/AppServer"
|
|
|
|
exit 0
|
2021-04-14 12:45:16 +00:00
|
|
|
;;
|
2021-04-06 11:28:12 +00:00
|
|
|
|
|
|
|
* )
|
|
|
|
echo "Unknown parameter $1" 1>&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "== BACK-END-BUILD =="
|
|
|
|
|
|
|
|
cd ${SRC_PATH}
|
2021-04-14 12:45:16 +00:00
|
|
|
dotnet build ASC.Web.sln ${ARGS}
|
2021-04-06 11:28:12 +00:00
|
|
|
|
|
|
|
|
2021-08-03 09:29:21 +00:00
|
|
|
# Array of names backend services in directory common (Nodejs)
|
|
|
|
services_name_backend_nodejs=(ASC.Thumbnails)
|
|
|
|
services_name_backend_nodejs+=(ASC.UrlShortener)
|
|
|
|
services_name_backend_nodejs+=(ASC.Socket.IO)
|
|
|
|
services_name_backend_nodejs+=(ASC.SsoAuth)
|
2021-04-06 11:28:12 +00:00
|
|
|
|
2021-08-03 09:29:21 +00:00
|
|
|
# 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
|