My friend Björn Rochel (@BjoernRochel) built a really cool generic model for using fakes and automocking on top of Machine.Specifications (or MSpec) called Machine.Fakes (or mfakes).
Today he released version 0.1.0.0 (get it from nuget.org) and I want to talk a bit about the build process. Björn and myself thought a tool called “Machine.Fakes” should of course be built with a tool called “FAKE – F# Make”. In order to do so I had to fix some stuff in Fake which resulted in the new Fake version 1.50.1.0.
Here are some things I fixed:
- New task DeleteDirs allows to delete multiple directories.
- New parameter for NuGet task which allows to specify dependencies.
- Bundled with docu.exe compiled against .Net 4.0.
- Fixed docu calls to run with full filenames.
- Added targetplatform, target and log switches for ILMerge task.
- Added Git.Information.getLastTag() which gets the last git tag by calling git describe.
- Added Git.Information.getCurrentHash() which gets the last current sha1.
Machine.Fakes build setup
The build script for Machine.Fakes performs the following steps:
- It retrieves the version no. via GitHubs REST API
- It cleans all directories from old stuff
- It compiles the app and test projects
- It uses MSpec to test the application
- It merges StructureMap and StructureMap.AutoMocking into the app by using ILMerge
- It generates the XML documentation using the .NET 4.0 version of docu.exe
- It zips the app and the documentation files
- It builds and deploys a Nuget package with just Machine.Fakes
- It builds and deploys bundled Nuget packages in the following flavors:
Now you can start using this awesome project by calling:
Tags: F#, Fake, Machine.Fakes, Machine.Specificationsinstall-package Machine.Fakes.{Flavor}
Great seeing yet another project hopping on FAKE!
However wouldn’t it be easier to fetch git info from the local repo instead of github?
Comment by Mauricio Scheffer — Friday, 25. February 2011 um 19:07 Uhr
Yes. That’s right. But teamcity.codebetter.com doesn’t support agent-side checkout at the moment. This is just a workaround.
Comment by Steffen Forkmann — Friday, 25. February 2011 um 19:43 Uhr
[…] Machine.Fakes 0.1.0.0 released – Built with "FAKE – F# Make" 1… – Steffen Forkmann highlights the first release of Machine.Fakes, a library from Björn Rochel which provides a way to work with mocking and fakes under Machine Specifications (MSpec), and discusses how its use of FAKE to build the library resulted in a new release of FAKE, the F# Make tool. […]
Pingback by The Morning Brew - Chris Alcock » The Morning Brew #802 — Tuesday, 1. March 2011 um 6:31 Uhr
Cool stuff – great work guys. Cheers, Mike
Comment by Mike Bild — Wednesday, 2. March 2011 um 13:16 Uhr