Skip to content

Instantly share code, notes, and snippets.

@damianh
Created April 11, 2011 18:54
Show Gist options
  • Save damianh/914045 to your computer and use it in GitHub Desktop.
Save damianh/914045 to your computer and use it in GitHub Desktop.
Patching OpenWrap.desc at build time.
OpenWrap.desc file:
name: Company.Component-%BranchName%
depends: Xunit
depends: Compare-NET-Objects
depends: Moq
depends: NLog
depends: openwrap
depends: Xunit.Extensions
In psake BuildTasks.ps1:
task PatchOpenWrapDesc{
$branchName = hg.exe branch
Get-Content $rootDir\OpenWrap.desc | Foreach-Object {$_ -replace "%BranchName%", "$branchName"} | Set-Content $rootDir\OpenWrap.desc
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment