From be607e470e4e5216e42c2430fe59acc08cfc5e8f Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 28 Sep 2019 11:12:46 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E6=A0=B9=E6=8D=AE=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84=E9=87=8D=E6=9E=84=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Directory.Build.props | 8 ++++++++ appveyor.build.ps1 | 9 --------- appveyor.test.ps1 | 6 +++--- appveyor.yml | 2 +- publish-admin.cmd | 3 +++ publish-client.cmd | 3 +++ watch-run-admin.cmd | 3 +++ watch-run-admin.sh | 2 ++ watch-run-client.cmd | 3 +++ watch-run-client.sh | 2 ++ 10 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 publish-admin.cmd create mode 100644 publish-client.cmd create mode 100644 watch-run-admin.cmd create mode 100644 watch-run-client.cmd diff --git a/Directory.Build.props b/Directory.Build.props index 9df49bac..448d547f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,6 +12,14 @@ true + + + + + + + + diff --git a/appveyor.build.ps1 b/appveyor.build.ps1 index 6e054495..d291b044 100644 --- a/appveyor.build.ps1 +++ b/appveyor.build.ps1 @@ -4,12 +4,3 @@ } runCmd "dotnet build src\admin\Bootstrap.Admin" runCmd "dotnet publish src\admin\Bootstrap.Admin --configuration Release --no-restore" - -$publishFolder = "$($env:appveyor_build_folder)\src\admin\Bootstrap.Admin\bin\Release\netcoreapp2.2\publish" -$licFile = "$($env:appveyor_build_folder)\src\admin\keys\Longbow.lic" -write-host "copy file $licFile" -ForegroundColor Cyan -xcopy $licFile $publishFolder /y - -$dbFile = "$($env:appveyor_build_folder)\src\admin\Bootstrap.Admin\BootstrapAdmin.db" -write-host "copy file $dbFile" -ForegroundColor Cyan -xcopy $dbFile $publishFolder /y \ No newline at end of file diff --git a/appveyor.test.ps1 b/appveyor.test.ps1 index 3460bb9f..db415d0d 100644 --- a/appveyor.test.ps1 +++ b/appveyor.test.ps1 @@ -1,6 +1,6 @@ function installDB() { write-host "init sqlserver database..." -ForegroundColor Cyan - $startPath = "$($env:appveyor_build_folder)\scripts\SqlServer" + $startPath = "$($env:appveyor_build_folder)\db\SqlServer" $sqlInstance = "(local)\SQL2014" $outFile = join-path $startPath "output.log" $sqlFile = join-path $startPath "Install.sql" @@ -14,7 +14,7 @@ $cmd = $mysql + ' -e "create database BootstrapAdmin;" -uroot' cmd.exe /c $cmd - $startPath = "$($env:appveyor_build_folder)\scripts\MySQL" + $startPath = "$($env:appveyor_build_folder)\db\MySQL" $para = ' -hlocalhost -uroot -DBootstrapAdmin < ' $sqlFile = join-path $startPath "Install.sql" $cmd = $mysql + $para + $sqlFile @@ -25,7 +25,7 @@ cmd.exe /c $cmd write-host "init mongodb data..." -ForegroundColor Cyan - $initFolder = "$($env:appveyor_build_folder)\scripts\MongoDB" + $initFolder = "$($env:appveyor_build_folder)\db\MongoDB" cd $initFolder cmd.exe /c "C:\mongodb\bin\mongo init.js" diff --git a/appveyor.yml b/appveyor.yml index 8ff3909a..60b317a3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,7 +27,7 @@ install: dotnet --version - xcopy "$($env:appveyor_build_folder)\scripts\MySQL\my.ini" "C:\Program Files\MySQL\MySQL Server 5.7" /y + xcopy "$($env:appveyor_build_folder)\db\MySQL\my.ini" "C:\Program Files\MySQL\MySQL Server 5.7" /y build_script: - ps: >- .\appveyor.build.ps1 diff --git a/publish-admin.cmd b/publish-admin.cmd new file mode 100644 index 00000000..f22cb3ed --- /dev/null +++ b/publish-admin.cmd @@ -0,0 +1,3 @@ +@echo off + +dotnet publish src\admin\Bootstrap.Admin -c Release diff --git a/publish-client.cmd b/publish-client.cmd new file mode 100644 index 00000000..2d3b5113 --- /dev/null +++ b/publish-client.cmd @@ -0,0 +1,3 @@ +@echo off + +dotnet publish src\client\Bootstrap.Client -c Release diff --git a/watch-run-admin.cmd b/watch-run-admin.cmd new file mode 100644 index 00000000..782c6476 --- /dev/null +++ b/watch-run-admin.cmd @@ -0,0 +1,3 @@ +@echo off + +dotnet watch --project ./src/admin/Bootstrap.Admin run \ No newline at end of file diff --git a/watch-run-admin.sh b/watch-run-admin.sh index 5d465637..fa427aef 100644 --- a/watch-run-admin.sh +++ b/watch-run-admin.sh @@ -1 +1,3 @@ +#! /bin/bash + dotnet watch --project ./src/admin/Bootstrap.Admin run \ No newline at end of file diff --git a/watch-run-client.cmd b/watch-run-client.cmd new file mode 100644 index 00000000..ce983821 --- /dev/null +++ b/watch-run-client.cmd @@ -0,0 +1,3 @@ +@echo off + +dotnet watch --project ./src/client/Bootstrap.Client run \ No newline at end of file diff --git a/watch-run-client.sh b/watch-run-client.sh index 00f6d77d..87a84eec 100644 --- a/watch-run-client.sh +++ b/watch-run-client.sh @@ -1 +1,3 @@ +#! /bin/bash + dotnet watch --project ./src/client/Bootstrap.Client run \ No newline at end of file