diff --git a/src/build/WebSharper.Build/Config.fs b/src/build/WebSharper.Build/Config.fs index a5948fffb..92417b18f 100644 --- a/src/build/WebSharper.Build/Config.fs +++ b/src/build/WebSharper.Build/Config.fs @@ -25,6 +25,7 @@ open System module Config = let PackageId = "WebSharper" let CompilerPackageId = "WebSharper.Compiler" + let TestingPackageId = "WebSharper.Testing" let PlainVersion = "3.5" let VersionSuffix = None let PackageVersion = PlainVersion + defaultArg VersionSuffix "" @@ -32,6 +33,7 @@ module Config = let Company = "IntelliFactory" let Description = "F#-to-JavaScript compiler and web application framework" let CompilerDescription = "F#-to-JavaScript compiler" + let TestingDescription = "Testing framework for F#-to-JavaScript compiled libraries" let LicenseUrl = "http://websharper.com/licensing" let Tags = ["Web"; "JavaScript"; "F#"] let Website = "http://bitbucket.org/IntelliFactory/websharper" diff --git a/src/build/WebSharper.Build/Main.fs b/src/build/WebSharper.Build/Main.fs index 73291b943..14489c688 100644 --- a/src/build/WebSharper.Build/Main.fs +++ b/src/build/WebSharper.Build/Main.fs @@ -57,7 +57,7 @@ module Main = Directory.EnumerateFiles(dir, "*.*", SearchOption.AllDirectories) |> Seq.map (fun p -> (p, p.Substring(dir.Length).Replace("\\", "/"))) - let private exports, compilerExports = + let private exports, compilerExports, testingExports = let lib kind name = Seq.concat [ Directory.EnumerateFiles(buildDir, name + ".dll") @@ -80,7 +80,6 @@ module Main = lib "lib" "WebSharper.Control" lib "lib" "WebSharper.JavaScript" lib "lib" "WebSharper.JQuery" - lib "lib" "WebSharper.Testing" // foreign: lib "tools" "FsNuGet" lib "tools" "NuGet.Core" @@ -101,6 +100,9 @@ module Main = lib "lib" "Mono.Cecil.Pdb" ] |> Seq.toList + , + // testingExports: + lib "lib" "WebSharper.Testing" let private nuPkgs () = let nuPkg = @@ -146,10 +148,11 @@ module Main = yield fileAt (Path.Combine(root, "src", "htmllib", "tags.csv")) ("/tools/net40/tags.csv") } } + let v = Version(nuPkg.GetComputedVersion().Split('-').[0]) let compilerNuPkg = let bt = bt.PackageId(Config.CompilerPackageId, Config.PackageVersion) - |> PackageVersion.Full.Custom (Version(nuPkg.GetComputedVersion().Split('-').[0])) + |> PackageVersion.Full.Custom v bt.NuGet.CreatePackage() .Configure(fun x -> { @@ -168,7 +171,29 @@ module Main = yield file kind src None } } - [ nuPkg; compilerNuPkg ] + let testingNuPkg = + let bt = + bt.PackageId(Config.TestingPackageId, Config.PackageVersion) + |> PackageVersion.Full.Custom v + bt.NuGet.CreatePackage() + .Configure(fun x -> + { + x with + Description = Config.TestingDescription + ProjectUrl = Some Config.Website + LicenseUrl = Some Config.LicenseUrl + Authors = [ Config.Company ] + }) + .AddDependency(Config.PackageId, nuPkg.GetComputedVersion()) + .AddNuGetExportingProject { + new INuGetExportingProject with + member p.NuGetFiles = + seq { + for kind, src in testingExports do + yield file kind src None + } + } + [ nuPkg; compilerNuPkg; testingNuPkg ] let Package () = let nuPkgs = nuPkgs ()