Recently, I decided to use my open source project, Reliable Unit Of Work for SQL Azure, as a catalyst for experiments about build process.
First, I had build scripts that runs on TeamCity server hosted in a VM on Microsoft Azure that I talked about it in a previous post. Then I found AppVeyor, a very interesting Continuous Integration (CI) service that simply will provision a fresh VM when GitHub changes are detected & run your build configuration in that VM. So I decided to move to AppVeyor. AppVeyor was actually able to do all my needs just via UI configuration, I even didn't need my build scripts. It can restore nuget package, build solutions, detect & run unit tests, pack nuget packages, and publish them to nuget.org.
I tried it for one release and result was good. But I thought more about this and I found that I'm mixing different concerns by this practice. I should be able to build solution in my local development environment exactly as I can do on the build server. So, I returned to using build scripts. My build script was based on PSake which is my favoriate at the moment. It is very readable & small & easy to use method. Here's my current script as an example.
The next experiment was changing my Git workflow. I haven't been following any specific Git workflow, just the common practice of branching & committing. Recently, I read about GitFlow and GitHubFlow; very interesting ideas. If this is new to you, maybe you need also to read Atlassian documentation about workflows.
I decided to use GitHubFlow because my project is very simple one at the moment. I combined this with GitVersion project to calculate version number based on Git flow. Also, I used GitVersionTask nuget package to dynamically calculate assembly version numbers. All worked together very smooth.
I used Chocolately to install PSake & GitVersion & Xunit binaries on the VM. The good news, GitVersion can automatically detect both TeamCity and AppVeyor, and then alter the version & build numbers. You can check last build log for more details.
This concluded my experiments happily, having a cloud-based CI service, GitHubFlow-based workflow & versioning strategy, and flexible & readable build script using PSake.