diff --git a/appveyor.yml b/appveyor.yml index 60fc80719..8498e4002 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -25,7 +25,9 @@ after_build: $version = $env:appveyor_build_version - #If ($env:appveyor_repo_tag -eq $True){$version = $env:appveyor_repo_tag_name} + $tag = $version + + If ($env:appveyor_repo_tag -eq $True){$tag = $env:appveyor_repo_tag_name} # build nupkg @@ -37,15 +39,15 @@ after_build: move tools\chocolatey\chocolateyInstall.ps1 chocoTemp\tools\chocolateyInstall.ps1 - (gc chocoTemp\tools\chocolateyInstall.ps1).replace('{{version}}',$version)|sc chocoTemp\tools\chocolateyInstall.ps1 + (gc chocoTemp\tools\chocolateyInstall.ps1).replace('{{version}}',$version).replace('{{tag}}',$tag)|sc chocoTemp\tools\chocolateyInstall.ps1 nuget pack chocoTemp\pretzel.nuspec -OutputDirectory artifacts -Version $version -NoPackageAnalysis # create zip - 7z a pretzel.$version.zip $env:appveyor_build_folder\src\Pretzel\bin\Release\Pretzel.exe* + 7z a Pretzel.$version.zip $env:appveyor_build_folder\src\Pretzel\bin\Release\Pretzel.exe* - 7z a pretzel.$version.zip ReleaseNotes.md + 7z a Pretzel.$version.zip ReleaseNotes.md test_script: - cinst opencover -source https://nuget.org/api/v2/ diff --git a/tools/chocolatey/chocolateyInstall.ps1 b/tools/chocolatey/chocolateyInstall.ps1 index be08c3120..687a289df 100644 --- a/tools/chocolatey/chocolateyInstall.ps1 +++ b/tools/chocolatey/chocolateyInstall.ps1 @@ -34,6 +34,6 @@ try { } $packageName = 'Pretzel' -$url = 'https://github.com/Code52/Pretzel/releases/download/{{version}}/Pretzel.{{version}}.zip' +$url = 'https://github.com/Code52/Pretzel/releases/download/{{tag}}/Pretzel.{{version}}.zip' Install-ChocolateyZipPackage "$packageName" "$url" "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" \ No newline at end of file