[HockeyApp + VSTS] Generate release notes from last git commit message

 Date: December 12, 2016

Continuous Integration and Continuous delivery for Xamarin apps with VSTS and HockeyApp is awesome!

I blogged about setting up CI/CD pipeline with VSTS+HockeyApp a few weeks ago.

If you want to add release notes to HockeyApp release you have two options:

  1. Add release notes manually, by setting 'Release Notes' property, and update them before every build (AKA - option that sucks)
  2. Add path to release notes file, by setting 'Release Notes (file)' property, and update it before every git push (AKA - option that sucks less)
  3. Add path to release notes file, by setting 'Release Notes (file)' property, and generate release notes from last git commit message on every build (AKA - option that rocks)

Applying options 1 and 2 is easy.

To make option 3 happen you need to add script that will get last git commit message, and output it to the file that you specified in 'Release Notes (file)' property. This script should be executed before 'Deploy to HockeyApp' step (of course).

For Xamarin.iOS you need to add 'Shell Script' task that can look like this:

echo "last commit: $BUILD_SOURCEVERSIONMESSAGE" > commit.txt

*it will output file to the same directory where shell script is located

For Xamarin.Droid and Windows builds, you can create PowerShell script.

 Tags:  programming

Previous
⏪ Predicting future with F# and Azure Machine Learning

Next
My notes from The Passionate Programmer ⏩