I've spent about an hour searching for an answer to this one and got nowhere, so I am hoping someone on here can help me.
Background
We are currently experimenting with deploying our Xamarin.Forms android app via App Center using the App Center Distribute
build task in VSTS.
One of the settings allows you to point at a release notes file in your project which will then be included as part of the email that gets sent out and on the app center release information when you click through to it. This file has to be UTF-8 format.
Question
Is there a way of actually formatting this file so that it displays nicely? I tried to use HTML, this didn't work. When just using a plain text file it ignores any line breaks in the text file and just displays all the text as a continuous string.
I am not after any ground breaking formatting if it's not possible, just wondering if there is a way of formatting so its at least not all one massive line of text.
Thanks in Advance
Gareth
You can technically format using markdown. Unfortunately Microsoft thinks the release notes should be a single line string, removing explicit and implicit newlines, as well as escaping \n
. Here's a simplified version of the YAML task, showing releaseNotesInput
being added using YAML Multiline block scalar syntax that adds a newline to each row.
- task: AppCenterDistribute@1
displayName: AppCenter Distribution iOS Test
inputs:
serverEndpoint: AppCenterConnectionName # known as ConnectionName in DevOps
appSlug: '{name|org}/{app|project}'
appFile: '$(build.artifactStagingDirectory)/**/*.ipa'
releaseNotesOption: 'input'
releaseNotesInput: |+
#AppCenterDistribute (iOS Test)\n
\n
- **Build Number** : $(build.buildNumber)
- **Build started** : $(system.pipelineStartTime)
- **Source Branch** : $(build.sourceBranch)
Unfortunately, this resolves as:
#AppCenterDistribute (Android Test)\n\n - Build Number : 20181115.13\n - Build started : 2018-11-15 11:42:44+11:00\n - Source Branch : refs/heads/feature/example\n
with the markdown formatting of only the bold **
wrapped text actually parsing correctly.
I'll keep experimenting... but I have to say that this is some of the saddest markdown formatting support I have ever encountered.
This works:
releaseNotesInput: |+
AppCenterDistribute (iOS UAT)
---
- **Build Number** : $(build.buildNumber)
- **Build started** : $(system.pipelineStartTime)
- **Source Branch** : $(build.sourceBranch)
#
for headings does not work, while ---
does.
The |+
syntax allows the necessary empty lines to trigger lists etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With