Created
March 17, 2014 08:20
-
-
Save forki/9595700 to your computer and use it in GitHub Desktop.
Start IIS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------------------------------------------------- | |
// FAKE build script | |
// -------------------------------------------------------------------------------------- | |
#r @"packages/FAKE/tools/FakeLib.dll" | |
#r @"packages/FAKE/tools/Fake.IIS.dll" | |
open Fake | |
open Fake.Git | |
open Fake.AssemblyInfoFile | |
open Fake.ReleaseNotesHelper | |
open Fake.IISExpress | |
open System | |
let project = "msu.Perception" | |
let summary = "msu.Perception is a web app" | |
let description = "msu.Perception is a web app" | |
let authors = ["Steffen Forkmann"; "Nils Grimmer"; "Matthias Machwig"] | |
let tags = "web mvc process" | |
let hostName = "localhost" | |
let port = 51100 | |
let solutionFile = "msu.Perception" | |
let testAssemblies = "tests/**/bin/Release/*.Tests*.dll" | |
let nugetDir = "./nuget/" | |
let websiteDir = "./temp/website/" | |
// Read additional information from the release notes document | |
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ | |
let release = parseReleaseNotes (IO.File.ReadAllLines "RELEASE_NOTES.md") | |
Target "AssemblyInfo" (fun _ -> | |
let fileName = "src/" + project + "/Properties/AssemblyInfo.cs" | |
CreateCSharpAssemblyInfo fileName | |
[ Attribute.Title project | |
Attribute.Product project | |
Attribute.Description summary | |
Attribute.Version release.AssemblyVersion | |
Attribute.FileVersion release.AssemblyVersion ] | |
) | |
Target "RestorePackages" RestorePackages | |
Target "Clean" (fun _ -> | |
CleanDirs ["bin"; "temp"; nugetDir] | |
) | |
Target "Build" (fun _ -> | |
!! "/**/*.csproj" | |
|> BuildWebsites websiteDir | |
) | |
Target "StartWebSite" (fun _ -> | |
let config = createConfigFile(project, 1, "iisexpress-template.config", websiteDir + "/" + project, hostName, port) | |
HostWebsite id config 1 |> ignore | |
) | |
Target "StopWebSite" (fun _ -> | |
killProcess "iisexpress" | |
) | |
Target "OpenBrowser" (fun _ -> | |
OpenWebsiteInBrowser hostName port | |
) | |
// -------------------------------------------------------------------------------------- | |
// Run all targets by default. Invoke 'build <Target>' to override | |
Target "All" DoNothing | |
"StopWebSite" | |
==> "Clean" | |
==> "RestorePackages" | |
==> "AssemblyInfo" | |
==> "Build" | |
==> "All" | |
"All" | |
==> "StartWebSite" | |
==> "OpenBrowser" | |
RunTargetOrDefault "All" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment