2014-12-12 19:12:30 +08:00
|
|
|
$root = (split-path -parent $MyInvocation.MyCommand.Definition) + '\..\..'
|
|
|
|
Write-Host $root
|
2014-12-12 18:22:17 +08:00
|
|
|
$version = [System.Reflection.Assembly]::LoadFile("$root\Output\Release\Wox.Plugin.dll").GetName().Version
|
2014-12-16 22:25:22 +08:00
|
|
|
$versionStr = "{0}.{1}.{2}.{3}" -f ($version.Major, $version.Minor, $version.Build, $version.Revision)
|
2014-12-12 18:22:17 +08:00
|
|
|
|
|
|
|
Write-Host "Setting .nuspec version tag to $versionStr"
|
|
|
|
|
2014-12-12 18:59:44 +08:00
|
|
|
$content = (Get-Content $root\Deploy\NuGet\wox.plugin.nuspec)
|
2014-12-12 18:22:17 +08:00
|
|
|
$content = $content -replace '\$version\$',$versionStr
|
|
|
|
|
2014-12-13 15:09:46 +08:00
|
|
|
$content | Out-File $root\deploy\nuget\wox.plugin.nuspec
|
2014-12-12 18:22:17 +08:00
|
|
|
|
2014-12-12 18:32:21 +08:00
|
|
|
& $root\.nuget\NuGet.exe pack $root\deploy\nuget\wox.plugin.nuspec
|