cirnogodot/Publish-linux.ps1
2025-05-03 16:48:24 +02:00

34 lines
No EOL
1.3 KiB
PowerShell

$butlerPath = "F:\Apps\butler\butler.exe"
$zipOutputDir = ".\release"
$fileName = "Cirno_No_Reason"
$gitVersionPath = "dotnet-gitversion.exe"
$buildDir = ".\build"
$gitVersionOutput = & $gitVersionPath | ConvertFrom-Json
$assemblySemFileVer = $gitVersionOutput.AssemblySemFileVer
$assemblySemVer = $gitVersionOutput.AssemblySemVer
$fullSemVer = $gitVersionOutput.FullSemVer
$PreReleaseLabel = $gitVersionOutput.PreReleaseLabelWithDash
$zipFileName = "$fileName.$fullSemVer.win.zip"
$zipFileNameLinux = "$fileName.$fullSemVer.linux.zip"
$zipFilePath = "$zipOutputDir\$zipFileName"
$zipFilePathLinux = "$zipOutputDir\$zipFileNameLinux"
# Zip the build folder
if (!(Test-Path $zipOutputDir)) {
New-Item -ItemType Directory -Path $zipOutputDir | Out-Null
}
#Compress-Archive -Path "$buildDir\win\*" -DestinationPath $zipFilePath -Force
#Compress-Archive -Path "$buildDir\*" -DestinationPath $zipFilePath -Force
#Write-Host "Windows Build completed and packaged as $zipFilePath"
Compress-Archive -Path "$buildDir\linux\*" -DestinationPath $zipFilePathLinux -Force
Write-Host "Linux Build completed and packaged as $zipFilePathLinux"
#& $butlerPath push $zipFilePath maddoscientisto/cirno-no-reason:windows$PreReleaseLabel --userversion $fullSemVer
& $butlerPath push $zipFilePathLinux maddoscientisto/cirno-no-reason:linux$PreReleaseLabel --userversion $fullSemVer