1 Star 0 Fork 105

zhangsanDev / ZKEACMS

forked from ZKEASOFT / ZKEACMS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Release.ps1 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
ZKEASOFT 提交于 2020-12-15 20:42 . Rename DataBase to Database
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"
Invoke-Expression("sqlite-exec -d Release/Application/App_Data/Database.sqlite -f Database/SQLite/ZKEACMS.sqlite.sql")
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)
C#
1
https://gitee.com/zhangsanDev/EditZKEACMS.Core.git
git@gitee.com:zhangsanDev/EditZKEACMS.Core.git
zhangsanDev
EditZKEACMS.Core
ZKEACMS
master

搜索帮助