mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-07-01 12:11:13 +00:00
feat: Added Powershell script for building project.
This commit is contained in:
parent
9a029225e1
commit
bfd89e9d82
20
src/ZonyLrcTools.Cli/publish.ps1
Normal file
20
src/ZonyLrcTools.Cli/publish.ps1
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
$Platforms = @('win-x64', 'linux-x64', 'osx-x64')
|
||||||
|
|
||||||
|
if (-not (Test-Path ./TempFiles)) {
|
||||||
|
New-Item -ItemType Directory -Path ./TempFiles | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
Remove-Item ./TempFiles/* -Recurse -Force
|
||||||
|
|
||||||
|
foreach ($platform in $Platforms) {
|
||||||
|
dotnet publish -r $platform -c Release -p:PublishSingleFile=true --self-contained true | Out-Null
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-Location ./bin/Release/net7.0/$platform/publish/
|
||||||
|
Compress-Archive -Path ./* -DestinationPath ./ZonyLrcTools_${platform}_${Env:PUBLISH_VERSION}.zip | Out-Null
|
||||||
|
Set-Location ../../../../../
|
||||||
|
|
||||||
|
Move-Item ./bin/Release/net7.0/$platform/publish/ZonyLrcTools_${platform}_${Env:PUBLISH_VERSION}.zip ./TempFiles
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user