diff --git a/Deploy/Nuget/pack.ps1 b/Deploy/Nuget/pack.ps1 index 27fd679165..c60839202f 100644 --- a/Deploy/Nuget/pack.ps1 +++ b/Deploy/Nuget/pack.ps1 @@ -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 diff --git a/Deploy/UpdateGenerator/build.bat b/Deploy/UpdateGenerator/build.bat deleted file mode 100644 index f51873e12d..0000000000 --- a/Deploy/UpdateGenerator/build.bat +++ /dev/null @@ -1,2 +0,0 @@ -cd /d %~dp0 -%~dp0Wox.UpdateFeedGenerator.exe diff --git a/Deploy/UpdateGenerator/build.ps1 b/Deploy/UpdateGenerator/build.ps1 new file mode 100644 index 0000000000..b8a3397efc --- /dev/null +++ b/Deploy/UpdateGenerator/build.ps1 @@ -0,0 +1,9 @@ +$path = $env:APPVEYOR_BUILD_FOLDER + "\Deploy\UpdateGenerator" + +$current_path = Convert-Path . +Write-Host "Current path: " + $current_path +Write-Host "Target path: " + $path + +Set-Location $path +& ".\Wox.UpdateFeedGenerator.exe" +Set-Location $current_path \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 318d15111d..8e8ffa840d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,23 +1,19 @@ version: 1.2.0.{build} -branches: - only: - - master os: Visual Studio 2015 configuration: Release platform: Any CPU assembly_info: patch: true file: AssemblyInfo.* - assembly_version: 1.2.0 + assembly_version: '{version}' assembly_file_version: '{version}' assembly_informational_version: '{version}-$(APPVEYOR_REPO_COMMIT)' before_build: - ps: nuget restore build: project: Wox.sln - publish_nuget: true after_build: -- cmd: .\Deploy\UpdateGenerator\build.bat +- ps: .\Deploy\UpdateGenerator\build.ps1 after_test: - ps: .\Deploy\Nuget\pack.ps1 artifacts: @@ -33,4 +29,4 @@ deploy: secure: AMF+zWfGP+02wq2u33PfSyCI2AbD+eek1ljd9q6zs0qEPMP+YwVF5mF9X1+XJD4wPItJB+S8h1AANUowXgfpd29aaYNmS73HWgaL6fqnN2U= artifact: nugetpackage on: - branch: master + branch: master \ No newline at end of file