Permalink
Browse files

Added web bundles build

  • Loading branch information...
1 parent 4171df1 commit 484fc1cf2695a66dc84480e359c904b4e734d28c @colinbull colinbull committed Jan 26, 2013
View
@@ -9,6 +9,7 @@ test/
!Samples/ContinuousDeploymentWebsite/src/test/
obj/
build/
+build-bundles/
nuget/
helpBuild/
Publish/
View
@@ -2,6 +2,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0F0488CC-2580-4C07-9E16-3997480F0221}"
ProjectSection(SolutionItems) = preProject
+ build-web-bundles.cmd = build-web-bundles.cmd
+ build-web-bundles.fsx = build-web-bundles.fsx
build.cmd = build.cmd
build.fsx = build.fsx
changelog.markdown = changelog.markdown
View
@@ -0,0 +1,26 @@
+@echo off
+
+:Build
+cls
+
+"tools\nuget\nuget.exe" "install" "FAKE" "-OutputDirectory" "tools" "-ExcludeVersion" "-Prerelease"
+
+SET TARGET="Default"
+
+IF NOT [%1]==[] (set TARGET="%1")
+
+"tools\FAKE\tools\Fake.exe" "build-web-bundles.fsx" "target=%TARGET%"
+
+rem Bail if we're running a TeamCity build.
+if defined TEAMCITY_PROJECT_NAME goto Quit
+
+rem Loop the build script.
+set CHOICE=nothing
+echo (Q)uit, (Enter) runs the build again
+set /P CHOICE=
+if /i "%CHOICE%"=="Q" goto :Quit
+
+GOTO Build
+
+:Quit
+exit /b %errorlevel%
View
@@ -0,0 +1,50 @@
+#r @"tools\FAKE\tools\FakeLib.dll"
+
+open System
+open Fake
+
+let buildDir = "./build-bundles"
+let targetDir = "./src/deploy.web/Fake.Deploy.Web/Bundles"
+let bundleProjects = !! @"src\deploy.web\Fake.Deploy.Web.DataProviders\**\*.*sproj"
+
+Target "Clean" (fun _ ->
+ CleanDirs [buildDir; targetDir]
+)
+
+Target "SetAssemblyInfo" (fun _ ->
+ AssemblyInfo
+ (fun p ->
+ {p with
+ CodeLanguage = FSharp;
+ AssemblyVersion = buildVersion;
+ AssemblyTitle = "FAKE - F# Deploy Web RavenDB Provider";
+ Guid = "A96DF3AB-BF56-4252-9C5F-9F2F6DAD5E8B";
+ OutputFileName = @".\src\deploy.web\Fake.Deploy.Web.DataProviders\Fake.Deploy.Web.RavenDb\AssemblyInfo.fs"})
+)
+
+Target "BuildBundles" (fun _ ->
+ for bundle in bundleProjects do
+ let bundleBuild = buildDir @@ IO.Path.GetFileNameWithoutExtension(bundle)
+ MSBuildRelease bundleBuild "Build" [bundle] |> ignore
+)
+
+Target "ZipBundles" (fun _ ->
+ for dir in IO.Directory.EnumerateDirectories(buildDir) do
+ let dir = IO.DirectoryInfo(dir)
+ let name = targetDir @@ dir.Name + ".zip"
+ let files = !! dir.FullName
+ Zip dir.FullName name files
+)
+
+Target "Default" DoNothing
+
+// Dependencies
+"Clean"
+ ==> "BuildBundles" <=> "ZipBundles"
+ ==> "Default"
+
+if not isLocalBuild then
+ "Clean" ==> "SetAssemblyInfo" ==> "BuildBundles" |> ignore
+
+// start build
+RunParameterTargetOrDefault "target" "Default"
@@ -140,6 +140,7 @@
<Content Include="favicon.ico" />
<Content Include="Global.asax" />
<Content Include="Images\server.png" />
+ <Content Include="Bundles\Fake.Deploy.Web.RavenDb.zip" />
<None Include="Scripts\jquery-1.9.0.intellisense.js" />
<Content Include="Scripts\app\Admin.Agent.js" />
<Content Include="Scripts\app\Admin.Environment.js" />

0 comments on commit 484fc1c

Please sign in to comment.