mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-15 20:19:17 +08:00
14 lines
604 B
PowerShell
14 lines
604 B
PowerShell
$root = (split-path -parent $MyInvocation.MyCommand.Definition) + '\..\..'
|
|
Write-Host $root
|
|
$version = [System.Reflection.Assembly]::LoadFile("$root\Output\Release\Wox.Plugin.dll").GetName().Version
|
|
$versionStr = "{0}.{1}.{2}.{3}" -f ($version.Major, $version.Minor, $version.Build, $version.Revision)
|
|
|
|
Write-Host "Setting .nuspec version tag to $versionStr"
|
|
|
|
$content = (Get-Content $root\Deploy\NuGet\wox.plugin.nuspec)
|
|
$content = $content -replace '\$version\$',$versionStr
|
|
|
|
$content | Out-File $root\deploy\nuget\wox.plugin.nuspec
|
|
|
|
& $root\.nuget\NuGet.exe pack $root\deploy\nuget\wox.plugin.nuspec
|