build: 根据最新目录结构重构脚本
This commit is contained in:
parent
19f8653996
commit
680d632efe
|
@ -12,6 +12,14 @@
|
|||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Condition=" '$(TargetFramework)' == 'netcoreapp2.2' " Name="PostPublish" AfterTargets="Publish">
|
||||
<Message Text="Publish -> $(PublishDir)" Importance="high" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src\admin\keys\Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/admin/keys/Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src\admin\Bootstrap.Admin\BootstrapAdmin.db" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/admin/Bootstrap.Admin/BootstrapAdmin.db" SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
<Target Condition=" '$(TargetFramework)' == 'netcoreapp2.2' " Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Message Text="Copy file -> $(TargetDir)" Importance="high" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(TargetDir)" SourceFiles="$(MSBuildThisFileDirectory)src\admin\keys\Longbow.lic" SkipUnchangedFiles="true" />
|
||||
|
|
|
@ -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
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
@echo off
|
||||
|
||||
dotnet publish src\admin\Bootstrap.Admin -c Release
|
|
@ -0,0 +1,3 @@
|
|||
@echo off
|
||||
|
||||
dotnet publish src\client\Bootstrap.Client -c Release
|
|
@ -0,0 +1,3 @@
|
|||
@echo off
|
||||
|
||||
dotnet watch --project ./src/admin/Bootstrap.Admin run
|
|
@ -1 +1,3 @@
|
|||
#! /bin/bash
|
||||
|
||||
dotnet watch --project ./src/admin/Bootstrap.Admin run
|
|
@ -0,0 +1,3 @@
|
|||
@echo off
|
||||
|
||||
dotnet watch --project ./src/client/Bootstrap.Client run
|
|
@ -1 +1,3 @@
|
|||
#! /bin/bash
|
||||
|
||||
dotnet watch --project ./src/client/Bootstrap.Client run
|
Loading…
Reference in New Issue