Skip to content

Commit

Permalink
Added tools to restore packages from custom NuGet repos (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb authored Feb 8, 2019
1 parent a8a385d commit b5ea565
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,21 @@ Target "AssemblyInfo" (fun _ ->
)

Target "RestorePackages" (fun _ ->
DotNetCli.Restore
(fun p ->
{ p with
Project = solutionFile
NoCache = false })
let customSource = getBuildParamOrDefault "customNuGetSource" ""

if(hasBuildParam "customNuGetSource") then
DotNetCli.Restore
(fun p ->
{ p with
Project = solutionFile
NoCache = false
AdditionalArgs = [sprintf "-s %s" customSource]})
else
DotNetCli.Restore
(fun p ->
{ p with
Project = solutionFile
NoCache = false })
)

Target "Build" (fun _ ->
Expand Down Expand Up @@ -405,7 +415,7 @@ Target "PrepareDeploy" DoNothing
"Clean" ==> "RestorePackages" ==> "BuildRelease" ==> "Docfx"

// Docker
"Clean" ==> "PublishCode" ==> "BuildDockerImages" ==> "Docker"
"BuildRelease" ==> "PublishCode" ==> "BuildDockerImages" ==> "Docker"

// all
"BuildRelease" ==> "All"
Expand All @@ -414,6 +424,6 @@ Target "PrepareDeploy" DoNothing
"Nuget" ==> "All"

// Deploy
"BuildRelease" ==> "Docker" ==> "PrepareDeploy"
"Docker" ==> "PrepareDeploy"

RunTargetOrDefault "Help"

0 comments on commit b5ea565

Please sign in to comment.