Fix continue integration in AppVeyor

This commit is contained in:
bao-qian
2015-11-04 03:24:41 +00:00
parent b1eb48d201
commit f2a93887c9
4 changed files with 17 additions and 20 deletions

View File

@@ -1,13 +1,7 @@
$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)
$path = $env:APPVEYOR_BUILD_FOLDER + "\Deploy\Nuget\wox.plugin.nuspec"
Write-Host "Setting .nuspec version tag to $versionStr"
$current_path = Convert-Path .
Write-Host "Current path: " + $current_path
Write-Host "Target path: " + $path
$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
& nuget pack $path -Version $env:APPVEYOR_BUILD_VERSION