代码拉取完成,页面将自动刷新
同步操作将从 ZKEASOFT/ZKEACMS 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Add-Type -assembly "system.io.compression.filesystem"
$source = "Release"
$destination = "ZKEACMS.zip"
Write-Host "Starting release" $destination
Write-Host "This may take a few minutes, please wait..."
if(Test-Path $source){
Remove-Item -Path $source -Force -Recurse
}
if(Test-path $destination) {
Remove-item -Path $destination -Force -Recurse
}
Invoke-Expression("dotnet restore")
Set-Location src/ZKEACMS.WebHost
Invoke-Expression("dotnet tool restore")
Invoke-Expression("dotnet tool run publish-zkeacms")
Set-Location ../../
Write-Host "Copy files..."
New-Item -Path "." -Name "Release" -ItemType "directory" -Force
Move-Item -Path "src/ZKEACMS.WebHost/bin/Release/PublishOutput" -Destination "Release/Application"
New-Item -Path "Release/Application" -Name "App_Data" -ItemType "directory"
Set-Location Database/SQLite
Invoke-Expression("dotnet tool restore")
Invoke-Expression("dotnet tool run sqlite-exec -d ../../Release/Application/App_Data/Database.sqlite -f ZKEACMS.sqlite.sql")
Set-Location ../../
Copy-Item -Path "Database/SQLite/appsettings.json" -Destination "Release/Application/appsettings.json" -Force
$dbSource = 'Database'
$dbDestination = 'Release/Database'
$exclude = @('*.mdf','*.ldf','*.cmd','*.exe','*.dll','*.sh','*.json')
$length =(Get-Item -Path ".\" -Verbose).FullName.Length + $dbSource.Length + 1
Get-ChildItem $dbSource -Recurse -Exclude $exclude | Copy-Item -Destination {Join-Path $dbDestination $_.FullName.Substring($length)}
Write-Host "Archive to" $destination
[io.compression.zipfile]::CreateFromDirectory($Source, $destination)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。