github deployment: is it possible to add command output to the description tag

cb's Avatar

cb

06 Apr, 2016 03:48 PM

Hi,
this is a simple question. When doing a deployment to github, can we add some output from a command to the description of the release? If so, how would I do it?
Idea would be to add output of git log --short to the release description.

  1. Support Staff 1 Posted by Feodor Fitsner on 06 Apr, 2016 05:18 PM

    Feodor Fitsner's Avatar

    Yes, you can put description into environment variable and then use it in provider settings, for example:

    deploy:
      provider: GitHub
      description: $(release_description)
      ...
    

    where release_description is environment variable. The only note there is that environment variables can't hold new lines, so they should be replaced with \n, for example:

    set release_description=Line1\nLine2
    
  2. 2 Posted by cb on 08 Apr, 2016 11:26 AM

    cb's Avatar

    Thanks, I almost expected such a solution. Unfortunately, this does not seem to work:
    https://github.com/chrisbra/vim-win32-installer/blob/master/appveyor.yml

    And the release is here:
    https://github.com/chrisbra/vim-win32-installer/releases
    Note, there is no output from the git log (Environment variable $(GITLOG) is not shown.

  3. 3 Posted by cb on 08 Apr, 2016 12:35 PM

    cb's Avatar

    I think it is working now

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:05 AM.

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