mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-05-08 03:06:29 +08:00
30 lines
1.5 KiB
PowerShell
30 lines
1.5 KiB
PowerShell
Write-Host @"
|
|
███╗ ██╗██╗ ██╗ ██████╗ ███████╗████████╗
|
|
████╗ ██║██║ ██║██╔════╝ ██╔════╝╚══██╔══╝
|
|
██╔██╗ ██║██║ ██║██║ ███╗█████╗ ██║
|
|
██║╚██╗██║██║ ██║██║ ██║██╔══╝ ██║
|
|
██║ ╚████║╚██████╔╝╚██████╔╝███████╗ ██║
|
|
╚═╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝
|
|
"@
|
|
|
|
$revision = git describe --always --tags --exclude latest
|
|
|
|
if ($revision -match '^(\d+\.\d+\.\d+)-(\d+)(?:-g[0-9a-f]+)?$') {
|
|
$baseVersion = $matches[1]
|
|
$commitCount = $matches[2]
|
|
$revision = "$baseVersion-preview$commitCount"
|
|
} else {
|
|
$revision = $gitVersion # fallback
|
|
}
|
|
|
|
Write-Host "NuGet Package Version: $revision"
|
|
|
|
Set-Location ..\ # Move to the root of the project
|
|
|
|
powershell -ExecutionPolicy Bypass -File "Scripts\update-version.ps1"
|
|
dotnet pack -c Release -p:PackageVersion=$revision -o .\Build -p:PreBuildEvent="" QuickLook.Common\QuickLook.Common.csproj
|
|
dotnet pack -c Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PackageVersion=$revision -o .\Build -p:PreBuildEvent="" QuickLook.Common\QuickLook.Common.csproj
|
|
|
|
# Write-Host "`nPress any key to exit..."
|
|
# [void][System.Console]::ReadKey($true)
|