Skip to content
Browse files

Small cleanup

  • Loading branch information...
1 parent 226eba6 commit 08bd4c763644fd691a7e1c8d160e1b2e56122f9d @forki forki committed Nov 19, 2010
Showing with 16 additions and 15 deletions.
  1. +11 −13 build.fsx
  2. +5 −2 src/app/FakeLib/FileHelper.fs
View
24 build.fsx
@@ -33,11 +33,9 @@ let nunitPath = @".\Tools\NUnit"
Target "Clean" (fun _ ->
CleanDirs [buildDir; testDir; deployDir; docsDir; metricsDir; nugetDir]
- ["./tools/Docu/docu.exe"
- "./tools/Docu/DocuLicense.txt"
- "./tools/FSharp/FSharp.Core.optdata"
+ ["./tools/FSharp/FSharp.Core.optdata"
"./tools/FSharp/FSharp.Core.sigdata"]
- |> CopyTo buildDir
+ |> Copy buildDir
)
Target "SetAssemblyInfo" (fun _ ->
@@ -85,7 +83,11 @@ Target "GenerateDocumentation" (fun _ ->
)
Target "CopyLicense" (fun _ ->
- Copy buildDir [@"License.txt"; @"readme.markdown"]
+ ["License.txt"
+ "readme.markdown"
+ "./tools/Docu/docu.exe"
+ "./tools/Docu/DocuLicense.txt"]
+ |> Copy buildDir
)
Target "BuildZip" (fun _ ->
@@ -115,16 +117,12 @@ Target "Test" (fun _ ->
Target "ZipCalculatorSample" (fun _ ->
// copy fake file output to sample tools path
!+ (buildDir + @"\**\*.*")
- |> Scan
- |> Copy @".\Samples\Calculator\tools\FAKE\"
+ |> CopyTo "./Samples/Calculator/tools/FAKE/"
!+ @"Samples\Calculator\**\*.*"
-- "**\*Resharper*\**"
- -- "**\*Resharper*"
- -- "**\bin\Debug\**"
- -- "**\obj\Debug\**"
- -- "**\bin\Release\**"
- -- "**\obj\Release\**"
+ -- "**\bin\**\**"
+ -- "**\obj\**\**"
|> Scan
|> Zip @".\Samples\Calculator" (deployDir @@ sprintf "CalculatorSample-%s.zip" buildVersion)
)
@@ -137,7 +135,7 @@ Target "ZipDocumentation" (fun _ ->
Target "DeployNuGet" (fun _ ->
let nugetDocsDir = nugetDir @@ "docs/"
- let nugetToolsDir = nugetDir @@ "sol/"
+ let nugetToolsDir = nugetDir @@ "tools/"
XCopy docsDir nugetDocsDir
XCopy buildDir nugetToolsDir
View
7 src/app/FakeLib/FileHelper.fs
@@ -135,9 +135,12 @@ let Copy target files =
files
|> Seq.iter (CopyFile target)
-/// <summary>Copies the given files to the target.</summary>
+/// <summary>Copies the given all files matching the given pattern to the target.</summary>
/// <param name="target">The target directory.</param>
-let CopyTo target = Copy target
+let CopyTo target pattern =
+ pattern
+ |> Scan
+ |> Copy target
/// Copies the files from a cache folder.
/// If the files are not cached or the original files have a different write time the cache will be refreshed.

0 comments on commit 08bd4c7

Please sign in to comment.
Something went wrong with that request. Please try again.