Add release packaging and automatic update support
This commit is contained in:
parent
94cd6b984b
commit
f971c374f8
20 changed files with 722 additions and 16 deletions
|
|
@ -1,17 +1,22 @@
|
|||
param([switch]$Publish,[switch]$Test)
|
||||
param([switch]$Publish,[switch]$Test,[switch]$Package)
|
||||
$ErrorActionPreference='Stop'
|
||||
Set-Location $PSScriptRoot
|
||||
$env:DOTNET_CLI_HOME=Join-Path $PSScriptRoot '.tools/home'
|
||||
$env:NUGET_PACKAGES=Join-Path $PSScriptRoot '.tools/packages'
|
||||
$env:DOTNET_CLI_TELEMETRY_OPTOUT='1'
|
||||
New-Item -ItemType Directory -Force '.tools/feed' | Out-Null
|
||||
$sdk=Join-Path $PSScriptRoot '.tools/dotnet/dotnet.exe'
|
||||
if (!(Test-Path $sdk)) { $sdk='dotnet' }
|
||||
& $sdk build src/AstroFrame.Desktop -c Release
|
||||
if ($LASTEXITCODE) { throw 'Build failed' }
|
||||
& $sdk build tests/AstroFrame.Validation -c Release
|
||||
if ($LASTEXITCODE) { throw 'Validation build failed' }
|
||||
if ($Test) { & $sdk run --project tests/AstroFrame.Validation -c Release --no-build; if ($LASTEXITCODE) {throw 'Validation failed'} }
|
||||
if ($Test) {
|
||||
& $sdk run --project tests/AstroFrame.Validation -c Release --no-build; if ($LASTEXITCODE) {throw 'Validation failed'}
|
||||
& $sdk run --project tests/AstroFrame.Updates.Validation -c Release; if ($LASTEXITCODE) {throw 'Update validation failed'}
|
||||
}
|
||||
if ($Publish) {
|
||||
& $sdk publish src/AstroFrame.Desktop -c Release -r win-x64 --self-contained true -o artifacts/AstroFrame
|
||||
if ($LASTEXITCODE) { throw 'Publish failed' }
|
||||
}
|
||||
if ($Package) { & ./packaging/Release.ps1; if ($LASTEXITCODE) { throw 'Packaging failed' } }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue