Skip to content

Commit

Permalink
ditched FAKE's NuGet helper, linking to NuGet directly
Browse files Browse the repository at this point in the history
  • Loading branch information
mausch committed Dec 3, 2010
1 parent 822c97c commit 86f0d4b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 35 deletions.
18 changes: 0 additions & 18 deletions SolrNet.nuspec

This file was deleted.

22 changes: 5 additions & 17 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ let slnBuild sln x =
let mainSln = slnBuild "solrnet.sln"
let sampleSln = slnBuild "SampleSolrApp.sln"

let nuGetBuild = Nu.build version

Target "Clean" (fun _ ->
mainSln "Clean"
sampleSln "Clean"
Expand Down Expand Up @@ -123,34 +125,20 @@ Target "Docs" (fun _ ->
rm_rf docsDir
)

let nuGet name desc =
NuGet (fun p ->
{ p with
ToolPath = "lib\\nuget.exe"
Project = name
Description = desc
Version = version
OutputPath = nugetDir }) "solrnet.nuspec"

Target "NuGet" (fun _ ->
rm_rf nugetDir
mkdir nugetDocs
mkdir nugetLib
cp docsFile nugetDocs
cp (buildDir @@ "SolrNet.dll") nugetLib
cp "SolrNet.nuspec" nugetDir
nuGet "SolrNet" "Apache Solr client"
nuGetBuild "SolrNet" "Apache Solr client"
)

let nuGetSingle dir name desc =
rm_rf nugetDir
mkdir nugetDocs
mkdir nugetLib
let src = dir @@ "bin" @@ config @@ (dir + ".*")
log src
!!src |> Copy nugetLib
cp "SolrNet.nuspec" nugetDir
nuGet "SolrNet-Windsor" "Windsor facility for SolrNet"
!!(dir @@ "bin" @@ config @@ (dir + ".*")) |> Copy nugetLib
nuGetBuild name desc

Target "NuGet.Windsor" (fun _ ->
nuGetSingle "Castle.Facilities.SolrNetIntegration" "SolrNet-Windsor" "Windsor facility for SolrNet"
Expand Down
28 changes: 28 additions & 0 deletions fake.fsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#I @"lib"
#r "FakeLib.dll"
#r "NuGet.exe"
#r "System.Xml.Linq"

open System
open Fake
open Fake.FileUtils

let solr = "solr-1.4.0"

Expand All @@ -23,6 +25,32 @@ module Xml =
let setValue s (n: XElement) = n.Value <- s
let replaceValue orig repl (n: XElement) = n.Value <- n.Value.Replace((orig:string), (repl:string))

module Nu =
open System.IO
open NuPack

let build version name desc =
let builder =
PackageBuilder(
Id = name,
Version = Version version,
Description = desc,
LicenseUrl = Uri("http://www.apache.org/licenses/LICENSE-2.0"),
Language = "en-US"
)
builder.Authors.Add "Mauricio Scheffer"
let buildFiles d =
!+ ("nuget" @@ d @@ "*") -- ("nuget" @@ d)
|> Scan
|> Seq.map (fun f -> PhysicalPackageFile(SourcePath = f, TargetPath = d @@ Path.GetFileName(f)))
|> Seq.toList
let libs = buildFiles "lib"
let docs = buildFiles "content"
let files = libs @ docs
builder.Files.AddRange (files |> Seq.map (fun i -> upcast i))
use fs = File.Create (sprintf "%s.%s%s" name version Constants.PackageExtension)
builder.Save fs

module Solr =
let private cmdline = "-DSTOP.PORT=8079 -DSTOP.KEY=secret -jar start.jar"
let start() =
Expand Down

0 comments on commit 86f0d4b

Please sign in to comment.