Issue With Interpolated Variable in Description field of GitHub Releases Deploy

Amrit Panesar's Avatar

Amrit Panesar

30 Mar, 2020 10:13 AM

Context: this is for a deployment on tag push

$CurrentTag and $TagMinusOne both work but $ChangeLog does not.

This might have been working at some point, but I can't seem to find any more information since these two issues:
https://help.appveyor.com/discussions/questions/2226-github-deploym...
https://help.appveyor.com/discussions/problems/1421-github-release-...

Here's my appveyor.yaml

version: b-{build}  
skip_non_tags: true  
configuration:  
- Debug
- Release
clone_depth: 1  
before_build:  
- ps: dotnet restore
build:  
  project: FrappeMocha.sln
  parallel: true
  verbosity: minimal
after_build:  
- ps: If(Test-Path -Path "bin\Release\*.exe") { Compress-Archive -Path bin\Release\*.exe -DestinationPath bin\Release\FrappeMocha-Release.zip } Else { Compress-Archive -Path bin\Debug\* -DestinationPath bin\Debug\FrappeMocha-Debug.zip }
artifacts:  
- path: bin\Release\FrappeMocha-Release.zip
  name: Release
- path: bin\Debug\FrappeMocha-Debug.zip
  name: Debug
before_deploy:  
- ps: >-
    $env:CurrentTag = git tag --sort=-committerdate | Select -Index (0)

    $env:TagMinusOne = git tag --sort=-committerdate | Select -Index (1)

    $ChangeLog = git log --pretty=format:%s $env:CurrentTag...$env:TagMinusOne

    $env:ChangeLog = $ChangeLog -join "\n"
deploy:  
- provider: GitHub
  tag: $(CurrentTag)
  release: Version $(CurrentTag)
  description: $(ChangeLog)
  auth_token:
    secure: iy+8lTlWIKPwbHYhYLcaJpHYlbP849yFUolLQ/wHBLXvVf+A7oQ8sq8s04oAghxA
  artifact: /.*\.zip/
  draft: true
  force_update: false

<pre><code>
Thanks again for running such an awesome service</code>
</pre>
  1. Support Staff 1 Posted by Feodor Fitsner on 30 Mar, 2020 08:48 PM

    Feodor Fitsner's Avatar

    Hi Amrit,

    It could be that environment variable is not being set at all. Usual reason is the size of variable. Have you tried putting there some test value, like test test test and see if it extrapolates?

  2. Feodor Fitsner closed this discussion on 30 May, 2020 09:02 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac