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.
61 lines
1.2 KiB
61 lines
1.2 KiB
1 month ago
|
#!/bin/bash
|
||
|
|
||
|
SYSTEM=`uname -s`
|
||
|
|
||
|
BUILD_CONFIG=Debug
|
||
|
PUBLISH_CONFIG=Release
|
||
|
NETCOREVER=net5.0
|
||
|
|
||
|
RUNTIME_WIN=win7-x64
|
||
|
RUNTIME_LINUX=ubuntu.18.04-x64
|
||
|
RUNTIME=$RUNTIME_WIN
|
||
|
|
||
|
if [ $SYSTEM = "Linux" ] ; then
|
||
|
RUNTIME=$RUNTIME_LINUX
|
||
|
fi
|
||
|
|
||
|
RESTORE=false
|
||
|
PUBLISH=false
|
||
|
|
||
|
|
||
|
if [ "$1" = "publish" ] ; then
|
||
|
RUNTIME=$RUNTIME_LINUX
|
||
|
PUBLISH=true
|
||
|
rm ./output_bill/* -rf
|
||
|
rm ./publish_bin/bin/* -rf
|
||
|
rm ./publish_bin/cfg/* -rf
|
||
|
PWD=`pwd`
|
||
|
echo $PWD
|
||
|
cp ./cfg/* ./publish_bin/cfg/ -rf
|
||
|
cp dbgame_test.js dbgame_test.sql ./publish_bin/
|
||
|
fi
|
||
|
|
||
|
build_one_proj_exe()
|
||
|
{
|
||
|
if [ $PUBLISH = "true" ] ; then
|
||
|
dotnet publish --configuration $PUBLISH_CONFIG --runtime $RUNTIME --output "publish_bin/bin" --framework $NETCOREVER
|
||
|
else
|
||
|
dotnet build --configuration $BUILD_CONFIG --runtime $RUNTIME --output "bin" --framework $NETCOREVER
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
|
||
|
build_one_proj_exe MysqlHandling
|
||
|
|
||
|
#exit 0
|
||
|
|
||
|
if [ $PUBLISH = "true" ] ; then
|
||
|
|
||
|
if [ "$2" != "full" ] ; then
|
||
|
rm ./publish_bin/bin/lib* -rf
|
||
|
rm ./publish_bin/bin/Microsoft* -rf
|
||
|
rm ./publish_bin/bin/System.* -rf
|
||
|
fi
|
||
|
|
||
|
rm ./mysql_test.tgz
|
||
|
tar zcvf ./mysql_test.tgz ./publish_bin
|
||
|
scp -P 62478 mysql_test.tgz ubuntu@110.43.53.241:~
|
||
|
scp -P 56000 mysql_test.tgz mmog@192.168.1.248:~/mysql_test/
|
||
|
md5sum ./mysql_test.tgz
|
||
|
fi
|