Skip to content

Commit

Permalink
Added possibility to bulk update assembly infos with file includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Kroenert authored and Florian Kroenert committed Jan 12, 2016
1 parent 867e3b6 commit 54f3127
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/app/FakeLib/AssemblyInfoHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,24 @@ let BulkReplaceAssemblyInfoVersions (dir:string) (replacementParameters:Assembly
|> Seq.iter(fun file ->
ReplaceAssemblyInfoVersions ((fun p -> {p with OutputFileName = file }) >> replacementParameters))
else logfn "%s does not exist." directory.FullName

/// Update all AssemblyInfos that were passed with given FileInclude
/// ## Parameters
///
/// - 'dir' - The directory (subdirectories will be included), which inhabits the AssemblyInfo files.
/// - 'replacementParameters' - The replacement parameters for the AssemblyInfo files.
///
/// ## Sample
///
/// let assemblyInfos = !!(@".\src\**\AssemblyInfo.cs")
/// --(@"**\*Scripts*\**")
///
/// ReplaceAssemblyInfoVersionsBulk assemblyInfos (fun f ->
/// { f with
/// AssemblyVersion = asmVersion
/// AssemblyInformationalVersion = asmInfoVersion
/// })
let ReplaceAssemblyInfoVersionsBulk (fileIncludes:FileIncludes) (replacementParameters:AssemblyInfoReplacementParams->AssemblyInfoReplacementParams) =
fileIncludes
|> Seq.iter(fun file ->
ReplaceAssemblyInfoVersions ((fun p -> {p with OutputFileName = file }) >> replacementParameters))

0 comments on commit 54f3127

Please sign in to comment.