Compare commits

...

3 Commits

Author SHA1 Message Date
Argo Zhang 680d632efe
build: 根据最新目录结构重构脚本 2019-09-28 11:17:38 +08:00
Argo Zhang 19f8653996
build: 目录调整
#Comment
数据库脚本文件归入 db 文件夹下
脚本文件归入 scripts 文件夹下
2019-09-28 11:17:25 +08:00
Argo Zhang cca7da1472
fix(#I12T0Y): 更新配置文件默认支持QQ兼容模式
#Comment
comment #I12T0Y

#Issue
link https://gitee.com/LongbowEnterprise/dashboard/issues?id=I12T0Y
2019-09-28 08:56:43 +08:00
32 changed files with 77 additions and 34 deletions

View File

@ -5,14 +5,14 @@ VisualStudioVersion = 16.0.29215.179
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQLServer", "SQLServer", "{87319AF5-7C40-4362-B67C-35F9DD737DB4}"
ProjectSection(SolutionItems) = preProject
scripts\SqlServer\InitData.sql = scripts\SqlServer\InitData.sql
scripts\SqlServer\install.ps1 = scripts\SqlServer\install.ps1
scripts\SqlServer\Install.sql = scripts\SqlServer\Install.sql
db\SqlServer\InitData.sql = db\SqlServer\InitData.sql
db\SqlServer\install.ps1 = db\SqlServer\install.ps1
db\SqlServer\Install.sql = db\SqlServer\Install.sql
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Admin", "src\admin\Bootstrap.Admin\Bootstrap.Admin.csproj", "{7B2B7043-3CB2-4C5A-BDF2-8C47F1A5471A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{586410F2-C1F0-47CD-AB28-2CF506DED2C8}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "db", "db", "{586410F2-C1F0-47CD-AB28-2CF506DED2C8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client", "src\client\Bootstrap.Client\Bootstrap.Client.csproj", "{C82A6E45-AB90-43D1-8429-5CBE953D8151}"
EndProject
@ -22,37 +22,37 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.DataAccess", "src
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQLite", "SQLite", "{523515EC-2AD7-4282-9AF4-9D20371183B0}"
ProjectSection(SolutionItems) = preProject
scripts\SQLite\InitData.sql = scripts\SQLite\InitData.sql
scripts\SQLite\Install.sql = scripts\SQLite\Install.sql
db\SQLite\InitData.sql = db\SQLite\InitData.sql
db\SQLite\Install.sql = db\SQLite\Install.sql
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.DataAccess.MongoDB", "src\admin\Bootstrap.DataAccess.MongoDB\Bootstrap.DataAccess.MongoDB.csproj", "{8336F096-4B4A-4710-A1FA-0F5E44CD8D26}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MongoDB", "MongoDB", "{A06A0AD8-A246-4329-B024-7174AE4A3EDE}"
ProjectSection(SolutionItems) = preProject
scripts\MongoDB\Dicts.js = scripts\MongoDB\Dicts.js
scripts\MongoDB\Groups.js = scripts\MongoDB\Groups.js
scripts\MongoDB\init.js = scripts\MongoDB\init.js
scripts\MongoDB\install.sh = scripts\MongoDB\install.sh
scripts\MongoDB\Navigations.js = scripts\MongoDB\Navigations.js
scripts\MongoDB\Roles.js = scripts\MongoDB\Roles.js
scripts\MongoDB\Users.js = scripts\MongoDB\Users.js
db\MongoDB\Dicts.js = db\MongoDB\Dicts.js
db\MongoDB\Groups.js = db\MongoDB\Groups.js
db\MongoDB\init.js = db\MongoDB\init.js
db\MongoDB\install.sh = db\MongoDB\install.sh
db\MongoDB\Navigations.js = db\MongoDB\Navigations.js
db\MongoDB\Roles.js = db\MongoDB\Roles.js
db\MongoDB\Users.js = db\MongoDB\Users.js
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MySQL", "MySQL", "{084E2E94-6B7D-4D3E-9BF1-6972427FBF80}"
ProjectSection(SolutionItems) = preProject
scripts\MySQL\initData.sql = scripts\MySQL\initData.sql
scripts\MySQL\install.sh = scripts\MySQL\install.sh
scripts\MySQL\install.sql = scripts\MySQL\install.sql
scripts\MySQL\my.ini = scripts\MySQL\my.ini
db\MySQL\initData.sql = db\MySQL\initData.sql
db\MySQL\install.sh = db\MySQL\install.sh
db\MySQL\install.sql = db\MySQL\install.sql
db\MySQL\my.ini = db\MySQL\my.ini
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "test\UnitTest\UnitTest.csproj", "{CFE75C48-F9D5-403A-8419-D07939BBD769}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Postgresql", "Postgresql", "{6F61C2AC-84D4-48A9-8A48-680657CC8175}"
ProjectSection(SolutionItems) = preProject
scripts\Postgresql\initData.sql = scripts\Postgresql\initData.sql
scripts\Postgresql\install.sql = scripts\Postgresql\install.sql
db\Postgresql\initData.sql = db\Postgresql\initData.sql
db\Postgresql\install.sql = db\Postgresql\install.sql
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client.DataAccess", "src\client\Bootstrap.Client.DataAccess\Bootstrap.Client.DataAccess.csproj", "{843811A2-FE49-410F-BF9F-9F1FB14A1DEE}"
@ -84,6 +84,31 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docker", "docker", "{85574E
src\admin\Bootstrap.Admin\Linux.Dockerfile = src\admin\Bootstrap.Admin\Linux.Dockerfile
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcipts", "srcipts", "{72C103DB-E1D3-449F-97C2-DF12CA111FD4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "win", "win", "{C6F2DCA0-7941-4C28-9328-2D495F5DCB00}"
ProjectSection(SolutionItems) = preProject
publish-admin.cmd = publish-admin.cmd
publish-client.cmd = publish-client.cmd
watch-run-admin.cmd = watch-run-admin.cmd
watch-run-client.cmd = watch-run-client.cmd
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "linux", "linux", "{FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110}"
ProjectSection(SolutionItems) = preProject
publish-admin.sh = publish-admin.sh
publish-client.sh = publish-client.sh
watch-run-admin.sh = watch-run-admin.sh
watch-run-client.sh = watch-run-client.sh
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ci", "ci", "{5F732D4E-133B-4DA6-811B-C369CDC3FB89}"
ProjectSection(SolutionItems) = preProject
appveyor.build.ps1 = appveyor.build.ps1
appveyor.test.ps1 = appveyor.test.ps1
appveyor.yml = appveyor.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -137,6 +162,9 @@ Global
{843811A2-FE49-410F-BF9F-9F1FB14A1DEE} = {C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0}
{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5} = {C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0}
{E03B7391-B52F-4449-B400-5CD9DE01F085} = {41B6D37A-5E5E-42B3-85E4-D81A81E3D757}
{C6F2DCA0-7941-4C28-9328-2D495F5DCB00} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
{FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
{5F732D4E-133B-4DA6-811B-C369CDC3FB89} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {221EAE38-5F75-4391-9A48-E462A9F3B8FC}

View File

@ -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" />

View File

@ -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

View File

@ -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"

View File

@ -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

3
publish-admin.cmd Normal file
View File

@ -0,0 +1,3 @@
@echo off
dotnet publish src\admin\Bootstrap.Admin -c Release

3
publish-client.cmd Normal file
View File

@ -0,0 +1,3 @@
@echo off
dotnet publish src\client\Bootstrap.Client -c Release

View File

@ -21,7 +21,6 @@ namespace Bootstrap.Admin.Controllers
/// Account controller.
/// </summary>
[AllowAnonymous]
[AutoValidateAntiforgeryToken]
public class AccountController : Controller
{
private const string MobileSchema = "Mobile";
@ -125,6 +124,7 @@ namespace Bootstrap.Admin.Controllers
/// <param name="password">Password.</param>
/// <param name="remember">Remember.</param>
[HttpPost]
[IgnoreAntiforgeryToken]
public async Task<IActionResult> Login(string userName, string password, string remember)
{
var auth = UserHelper.Authenticate(userName, password);

View File

@ -15,7 +15,7 @@
"ConnectionStrings": {
"ba": "Data Source=.;Initial Catalog=BootstrapAdmin;User ID=sa;Password=sa"
},
"SupportQQBrowser": false,
"SupportQQBrowser": true,
"DB": [
{
"Enabled": false,

3
watch-run-admin.cmd Normal file
View File

@ -0,0 +1,3 @@
@echo off
dotnet watch --project ./src/admin/Bootstrap.Admin run

View File

@ -1 +1,3 @@
#! /bin/bash
dotnet watch --project ./src/admin/Bootstrap.Admin run

3
watch-run-client.cmd Normal file
View File

@ -0,0 +1,3 @@
@echo off
dotnet watch --project ./src/client/Bootstrap.Client run

View File

@ -1 +1,3 @@
#! /bin/bash
dotnet watch --project ./src/client/Bootstrap.Client run