Skip to content

Commit

Permalink
Adding RestorePackaes as a target
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Jan 9, 2013
1 parent 61db2f5 commit a409efb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
6 changes: 6 additions & 0 deletions RestorePackages.cmd
@@ -0,0 +1,6 @@
@echo off
cls

"tools\nuget\nuget.exe" "install" "FAKE" "-OutputDirectory" "tools" "-ExcludeVersion" "-Prerelease"
"tools\FAKE\tools\Fake.exe" "build.fsx" "target=RestorePackages"
exit /b %errorlevel%
20 changes: 10 additions & 10 deletions build.fsx
Expand Up @@ -10,8 +10,7 @@ let authors = ["Steffen Forkmann"; "Mauricio Scheffer"; "Colin Bull"]
let mail = "forkmann@gmx.de"
let homepage = "http://github.com/forki/fake"

TraceEnvironmentVariables()
RestorePackages()
TraceEnvironmentVariables()

let buildDir = @".\build\"
let testDir = @".\test\"
Expand All @@ -23,16 +22,13 @@ let reportDir = @".\report\"
let deployZip = deployDir @@ sprintf "%s-%s.zip" projectName buildVersion
let packagesDir = @".\packages\"

// tools
let templatesSrcDir = @".\tools\Docu\templates\"
let MSpecVersion = GetPackageVersion packagesDir "Machine.Specifications"
let mspecTool = sprintf @"%sMachine.Specifications.%s\tools\mspec-clr4.exe" packagesDir MSpecVersion

// files
let appReferences = !! @"src\app\**\*.*sproj"
let testReferences = !! @"src\test\**\*.*sproj"

// Targets
Target "RestorePackages" RestorePackages

Target "Clean" (fun _ ->
CleanDirs [buildDir; testDir; deployDir; docsDir; metricsDir; nugetDir; reportDir]

Expand Down Expand Up @@ -89,7 +85,7 @@ Target "GenerateDocumentation" (fun _ ->
|> Docu (fun p ->
{p with
ToolPath = buildDir @@ "docu.exe"
TemplatesPath = templatesSrcDir
TemplatesPath = @".\tools\Docu\templates\"
OutputPath = docsDir })
)

Expand Down Expand Up @@ -119,7 +115,10 @@ Target "BuildTest" (fun _ ->
|> Log "TestBuild-Output: "
)

Target "Test" (fun _ ->
Target "Test" (fun _ ->
let MSpecVersion = GetPackageVersion packagesDir "Machine.Specifications"
let mspecTool = sprintf @"%sMachine.Specifications.%s\tools\mspec-clr4.exe" packagesDir MSpecVersion

!! (testDir @@ "Test.*.dll")
|> MSpec (fun p ->
{p with
Expand Down Expand Up @@ -155,7 +154,8 @@ Target "CreateNuGet" (fun _ ->
Target "Default" DoNothing

// Dependencies
"Clean"
"RestorePackages"
==> "Clean"
==> "BuildApp" <=> "BuildTest"
==> "Test"
==> "CopyLicense" <=> "CopyDocu"
Expand Down

0 comments on commit a409efb

Please sign in to comment.