Browse Source

add aspnetcore-build script file

pull/263/head
cKey 5 years ago
parent
commit
effc40322b
  1. 37
      aspnet-core/configuration/account/AuthServer.Host/appsettings.Development.json
  2. 8
      aspnet-core/configuration/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/appsettings.Development.json
  3. 5
      aspnet-core/configuration/apigateway/LINGYUN.ApiGateway.Host/appsettings.Development.json
  4. 13
      aspnet-core/configuration/apigateway/LINGYUN.ApiGateway.HttpApi.Host/appsettings.Development.json
  5. 13
      aspnet-core/configuration/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/appsettings.Development.json
  6. 19
      aspnet-core/configuration/messages/LINGYUN.Abp.MessageService.HttpApi.Host/appsettings.Development.json
  7. 13
      aspnet-core/configuration/platform/LINGYUN.Platform.HttpApi.Host/appsettings.Development.json
  8. 2
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml
  9. 22
      build/build-aspnetcore-build.ps1
  10. 16
      build/build-aspnetcore-common.ps1

37
aspnet-core/configuration/account/AuthServer.Host/appsettings.Development.json

@ -2,13 +2,7 @@
"App": { "App": {
"TrackingEntitiesChanged": true, "TrackingEntitiesChanged": true,
"SelfUrl": "http://localhost:44385/", "SelfUrl": "http://localhost:44385/",
"CorsOrigins": "http://localhost:4200,http://localhost:9528,http://127.0.0.1:63898", "CorsOrigins": "http://localhost:4200,http://localhost:9528,http://127.0.0.1:63898"
"Forwarded": {
"ForwardedHeaders": 5,
"KnownProxies": [
"127.0.0.1"
]
}
}, },
"AppSelfUrl": "http://localhost:44385/", "AppSelfUrl": "http://localhost:44385/",
"ConnectionStrings": { "ConnectionStrings": {
@ -20,25 +14,6 @@
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456",
"AbpFeatureManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456" "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456"
}, },
"Identity": {
"Password": {
"RequiredLength": 6,
"RequiredUniqueChars": 0,
"RequireNonAlphanumeric": false,
"RequireLowercase": false,
"RequireUppercase": false,
"RequireDigit": false
},
"Lockout": {
"AllowedForNewUsers": false,
"LockoutDuration": 5,
"MaxFailedAccessAttempts": 5
},
"SignIn": {
"RequireConfirmedEmail": false,
"RequireConfirmedPhoneNumber": false
}
},
"CAP": { "CAP": {
"EventBus": { "EventBus": {
"DefaultGroupName": "AuthServer", "DefaultGroupName": "AuthServer",
@ -64,16 +39,6 @@
"Authority": "http://localhost:44385/", "Authority": "http://localhost:44385/",
"ApiName": "lingyun-abp-application" "ApiName": "lingyun-abp-application"
}, },
"WeChat": {
"Auth": {
"AppId": "微信AppId",
"AppSecret": "微信AppSecret"
},
"Signature": {
"RequestPath": "微信开发者中心填写的验证地址",
"Token": "微信开发者中心填写的Token"
}
},
"IdentityServer": { "IdentityServer": {
"Clients": { "Clients": {
"AuthManagement": { "AuthManagement": {

8
aspnet-core/configuration/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/appsettings.Development.json

@ -1,13 +1,7 @@
{ {
"App": { "App": {
"TrackingEntitiesChanged": true, "TrackingEntitiesChanged": true,
"SelfUrl": "http://localhost:44385/", "SelfUrl": "http://localhost:44385/"
"Forwarded": {
"ForwardedHeaders": 5,
"KnownProxies": [
"127.0.0.1"
]
}
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", "Default": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456",

5
aspnet-core/configuration/apigateway/LINGYUN.ApiGateway.Host/appsettings.Development.json

@ -3,9 +3,8 @@
"AppId": "TEST-APP"//OcelotAPI, "AppId": "TEST-APP"//OcelotAPI,
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1", "Configuration": "127.0.0.1,defaultDatabase=10",
"InstanceName": "LINGYUN.AbpApplication", "InstanceName": "LINGYUN.AbpApplication"
"DefaultDatabase": 10
}, },
"RemoteServices": { "RemoteServices": {
"ApiGateway": { "ApiGateway": {

13
aspnet-core/configuration/apigateway/LINGYUN.ApiGateway.HttpApi.Host/appsettings.Development.json

@ -1,13 +1,7 @@
{ {
"App": { "App": {
"TrackingEntitiesChanged": true, "TrackingEntitiesChanged": true,
"SelfUrl": "http://localhost:44385/", "SelfUrl": "http://localhost:44385/"
"Forwarded": {
"ForwardedHeaders": 5,
"KnownProxies": [
"127.0.0.1"
]
}
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=ApiGateway;User Id=root;Password=123456", "Default": "Server=127.0.0.1;Database=ApiGateway;User Id=root;Password=123456",
@ -17,9 +11,8 @@
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456" "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456"
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1", "Configuration": "127.0.0.1,defaultDatabase=10",
"InstanceName": "LINGYUN.AbpApplication", "InstanceName": "LINGYUN.AbpApplication"
"DefaultDatabase": 10
}, },
"CAP": { "CAP": {
"EventBus": { "EventBus": {

13
aspnet-core/configuration/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/appsettings.Development.json

@ -1,12 +1,6 @@
{ {
"App": { "App": {
"TrackingEntitiesChanged": true, "TrackingEntitiesChanged": true
"Forwarded": {
"ForwardedHeaders": 5,
"KnownProxies": [
"127.0.0.1"
]
}
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456", "Default": "Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456",
@ -35,9 +29,8 @@
} }
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1", "Configuration": "127.0.0.1,defaultDatabase=10",
"InstanceName": "LINGYUN.AbpApplication", "InstanceName": "LINGYUN.AbpApplication"
"DefaultDatabase": 10
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://localhost:44385/", "Authority": "http://localhost:44385/",

19
aspnet-core/configuration/messages/LINGYUN.Abp.MessageService.HttpApi.Host/appsettings.Development.json

@ -1,12 +1,6 @@
{ {
"App": { "App": {
"CorsOrigins": "http://localhost:9527,http://127.0.0.1:30000", "CorsOrigins": "http://localhost:9527,http://127.0.0.1:30000"
"Forwarded": {
"ForwardedHeaders": 5,
"KnownProxies": [
"127.0.0.1"
]
}
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Messages;User Id=root;Password=123456", "Default": "Server=127.0.0.1;Database=Messages;User Id=root;Password=123456",
@ -16,9 +10,8 @@
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456" "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456"
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1", "Configuration": "127.0.0.1,defaultDatabase=10",
"InstanceName": "LINGYUN.AbpApplication", "InstanceName": "LINGYUN.AbpApplication"
"DefaultDatabase": 10
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://localhost:44385/", "Authority": "http://localhost:44385/",
@ -30,12 +23,6 @@
"TablePrefix": "AppHangfire" "TablePrefix": "AppHangfire"
} }
}, },
"WeChat": {
"Auth": {
"AppId": "你自己的微信AppId",
"AppSecret": "你自己的微信AppSecret"
}
},
"Notifications": { "Notifications": {
"WeChat": { "WeChat": {
"WeApp": { "WeApp": {

13
aspnet-core/configuration/platform/LINGYUN.Platform.HttpApi.Host/appsettings.Development.json

@ -1,12 +1,6 @@
{ {
"App": { "App": {
"CorsOrigins": "http://localhost:9527,http://127.0.0.1:30000", "CorsOrigins": "http://localhost:9527,http://127.0.0.1:30000"
"Forwarded": {
"ForwardedHeaders": 5,
"KnownProxies": [
"127.0.0.1"
]
}
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", "Default": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456",
@ -57,9 +51,8 @@
} }
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1", "Configuration": "127.0.0.1,defaultDatabase=10",
"InstanceName": "LINGYUN.AbpApplication", "InstanceName": "LINGYUN.AbpApplication"
"DefaultDatabase": 10
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://localhost:44385/", "Authority": "http://localhost:44385/",

2
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml

@ -188,7 +188,7 @@
CAP消息扩展 CAP消息扩展
</summary> </summary>
</member> </member>
<member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPMessageExtensions.TryGetTenantId(DotNetCore.CAP.Messages.Message,System.Guid@)"> <member name="M:LINGYUN.Abp.EventBus.CAP.AbpCAPMessageExtensions.TryGetTenantId(DotNetCore.CAP.Messages.Message,System.Nullable{System.Guid}@)">
<summary> <summary>
尝试获取消息标头中的租户标识 尝试获取消息标头中的租户标识
</summary> </summary>

22
build/build-aspnetcore-build.ps1

@ -0,0 +1,22 @@
. "./build-aspnetcore-common.ps1"
# Build all solutions
foreach ($service in $serviceArray) {
$copyFromConfig = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($rootFolder + $service.ConfigPath + $service.ConfigFile)
if (Test-Path $copyFromConfig)
{
$copyToConfig = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($service.Path + $service.ConfigFile)
$configExists = Test-Path $copyToConfig
if ($configExists -eq $false) {
Write-host ""
Write-host "Coping appsettings.Development.json ..." -ForegroundColor red -BackgroundColor yellow
Write-host ""
Copy-Item $copyFromConfig $copyToConfig
}
}
Set-Location $service.Path
dotnet build --no-cache
}
Set-Location $rootFolder

16
build/build-aspnetcore-common.ps1

@ -5,14 +5,14 @@ $rootFolder = (Get-Item -Path "./" -Verbose).FullName
# List of solutions used only in development mode # List of solutions used only in development mode
[PsObject[]]$serviceArray = @() [PsObject[]]$serviceArray = @()
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/account/AuthServer.Host"; Service = "identityserver" } $serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/account/AuthServer.Host/"; Service = "identityserver"; ConfigPath = "/../aspnet-core/configuration/account/AuthServer.Host/"; ConfigFile = "appsettings.Development.json" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host"; Service = "admin" } $serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/"; Service = "admin"; ConfigPath = "/../aspnet-core/configuration/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/"; ConfigFile = "appsettings.Development.json" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host"; Service = "identityserver4-admin" } $serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/"; Service = "identityserver4-admin"; ConfigPath = "/../aspnet-core/configuration/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/"; ConfigFile = "appsettings.Development.json" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host"; Service = "apigateway-host" } $serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/"; Service = "apigateway-host"; ConfigPath = "/../aspnet-core/configuration/apigateway/LINGYUN.ApiGateway.Host/"; ConfigFile = "appsettings.Development.json" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host"; Service = "apigateway-admin" } $serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/"; Service = "apigateway-admin"; ConfigPath = "/../aspnet-core/configuration/apigateway/LINGYUN.ApiGateway.HttpApi.Host/"; ConfigFile = "appsettings.Development.json" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host"; Service = "messages" } $serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/"; Service = "messages"; ConfigPath = "/../aspnet-core/configuration/messages/LINGYUN.Abp.MessageService.HttpApi.Host/"; ConfigFile = "appsettings.Development.json" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host"; Service = "platform" } $serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/"; Service = "platform"; ConfigPath = "/../aspnet-core/configuration/platform/LINGYUN.Platform.HttpApi.Host/"; ConfigFile = "appsettings.Development.json" }
$serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host"; Service = "localization" } $serviceArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/"; Service = "localization"; ConfigPath = "/../aspnet-core/configuration/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/"; ConfigFile = "appsettings.Development.json" }
Write-host "" Write-host ""
Write-host ":::::::::::::: !!! You are in development mode !!! ::::::::::::::" -ForegroundColor red -BackgroundColor yellow Write-host ":::::::::::::: !!! You are in development mode !!! ::::::::::::::" -ForegroundColor red -BackgroundColor yellow

Loading…
Cancel
Save