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-05-05 11:48:34 +00:00
|
|
|
dotnet restore ASC.Web.sln${ARGS}
|
2021-04-14 12:45:16 +00:00
|
|
|
dotnet build ASC.Web.sln ${ARGS}
|
2021-04-06 11:28:12 +00:00
|
|
|
|
|
|
|
echo "== Build ASC.Thumbnails =="
|
|
|
|
yarn install --cwd common/ASC.Thumbnails --frozen-lockfile
|
|
|
|
|
|
|
|
echo "== Build ASC.UrlShortener =="
|
|
|
|
yarn install --cwd common/ASC.UrlShortener --frozen-lockfile
|
|
|
|
|
|
|
|
echo "== Build ASC.Socket.IO =="
|
|
|
|
yarn install --cwd common/ASC.Socket.IO --frozen-lockfile
|