You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
653 B

1 month ago
#!/bin/bash
SYSTEM=`uname -s`
BUILD_CONFIG=Debug
PUBLISH_CONFIG=Release
NETCOREVER=netcoreapp3.1
RUNTIME_WIN=win-x64
RUNTIME_LINUX=ubuntu.16.04-x64
RUNTIME=$RUNTIME_WIN
if [ $SYSTEM = "Linux" ] ; then
RUNTIME=$RUNTIME_LINUX
fi
RELEASE_OUTPUT=./publish/
build_one_proj()
{
dotnet publish $1 --configuration $PUBLISH_CONFIG --runtime $RUNTIME --output $RELEASE_OUTPUT$1 --framework $NETCOREVER
if [ $? -ne 0 ]; then
echo "****************************** build error **********************"
exit 0
else
echo "****************************** build success ********************"
fi
}
build_one_proj ClientSocket
build_one_proj ServerSocket