Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added metadata string property for AssemblyInfoReplacementParams #675

Merged
merged 3 commits into from
Mar 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/app/FakeLib/AssemblyInfoHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,17 @@ type AssemblyInfoReplacementParams =
AssemblyVersion : string
AssemblyFileVersion : string
AssemblyInformationalVersion : string
AssemblyConfiguration : string }
AssemblyConfiguration : string
AssemblyMetadata : string}

/// AssemblyInfoReplacement default params
let AssemblyInfoReplacementDefaults =
{ OutputFileName = null
AssemblyConfiguration = null
AssemblyVersion = null
AssemblyFileVersion = null
AssemblyInformationalVersion = null }
AssemblyInformationalVersion = null
AssemblyMetadata = null}

let ReplaceAssemblyInfoVersions param =
let (parameters : AssemblyInfoReplacementParams) = param AssemblyInfoReplacementDefaults
Expand All @@ -230,6 +232,7 @@ let ReplaceAssemblyInfoVersions param =
|> replaceAttribute "AssemblyConfiguration" parameters.AssemblyConfiguration
|> replaceAttribute "AssemblyFileVersion" parameters.AssemblyFileVersion
|> replaceAttribute "AssemblyInformationalVersion" parameters.AssemblyInformationalVersion
|> replaceAttribute "AssemblyMetadata" parameters.AssemblyMetadata

ReadFile parameters.OutputFileName
|> Seq.map replaceLine
Expand All @@ -254,4 +257,4 @@ let BulkReplaceAssemblyInfoVersions (dir:string) (replacementParameters:Assembly
!!(directory.FullName @@ @"\**\AssemblyInfo.*")
|> Seq.iter(fun file ->
ReplaceAssemblyInfoVersions ((fun p -> {p with OutputFileName = file }) >> replacementParameters))
else logfn "%s does not exist." directory.FullName
else logfn "%s does not exist." directory.FullName