Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/fsharp/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
rflechner committed Feb 18, 2016
2 parents 615448e + 43c4800 commit 44bed1e
Show file tree
Hide file tree
Showing 71 changed files with 4,738 additions and 603 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ release.cmd
Samples/typescript/out/
help/RELEASE_NOTES.md
paket.exe
paket-files/

# Ignore the Vagrant local directories
.vagrant/*
Expand Down
2 changes: 2 additions & 0 deletions FAKE.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/Environment/UnitTesting/ShadowCopy/@EntryValue">False</s:Boolean></wpf:ResourceDictionary>
42 changes: 41 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
#### 4.20.0 - 06.02.2016
* Allows to create full Wix directory hierarchy - https://github.com/fsharp/FAKE/pull/1116
* New PicklesHelper for generating living documentation with Pickles - https://github.com/fsharp/FAKE/pull/1126
* BUGFIX: Replaced system directory separator with "/" in ArchiveHelper - https://github.com/fsharp/FAKE/pull/1127

#### 4.19.0 - 02.02.2016
* New FSC task - https://github.com/fsharp/FAKE/pull/1122
* Disable warning from #1082 for now because it created lots of confusion

#### 4.18.0 - 02.02.2016
* New helpers which allow to send .NET coverage settings to TeamCity - https://github.com/fsharp/FAKE/pull/1117
* Disabled NodeReuse on TeamCity, it can lead to consecutive builds failing - https://github.com/fsharp/FAKE/pull/1110
* Added IncludeReferencedProjects property to the Packet.Pack params - https://github.com/fsharp/FAKE/pull/1112
* BUGFIX: Ensure that traceEndTask is called in DotCover - https://github.com/fsharp/FAKE/pull/1118
* BUGFIX: WiXHelper: fixed typos in WiXDir.ToString - https://github.com/fsharp/FAKE/pull/1120

#### 4.17.0 - 23.01.2016
* Renamed internal FSharp.Compiler.Service to avoid clashes - https://github.com/fsharp/FAKE/pull/1097
* Added support for "paket restore" - https://github.com/fsharp/FAKE/pull/1108
* WiX service install - https://github.com/fsharp/FAKE/pull/1099
* Passing timeout value also to solution exchanger in DynamicsCRMHelper - https://github.com/fsharp/FAKE/pull/1102
* BUGFIX: Fallback to recompile when caching of build script fails - https://github.com/fsharp/FAKE/pull/1093
* BUGFIX: Commit message will be retrieved for older and newer git versions - https://github.com/fsharp/FAKE/pull/1098
* BUGFIX: Fixed case sensitivity on package name when search references in Paket.lock - https://github.com/fsharp/FAKE/pull/1089
* COSMETICS: Don't show the obsolete usage - https://github.com/fsharp/FAKE/pull/1094

#### 4.16.0 - 20.01.2016
* General FAKE improvements - https://github.com/fsharp/FAKE/pull/1088
* Hockey app UploadTimeout - https://github.com/fsharp/FAKE/pull/1087

#### 4.15.0 - 19.01.2016
* Add support for appcast generation - https://github.com/fsharp/FAKE/pull/1057
* Function to remove Compile elems missing files - https://github.com/fsharp/FAKE/pull/1078
* AssemblyInfoFile: added functions to read and update attributes -https://github.com/fsharp/FAKE/pull/1073
* Added support for packing symbols via PaketHelper - https://github.com/fsharp/FAKE/pull/1071
* Tell the clr to use the cached assemblies even when it tries to reload them with a different context - https://github.com/fsharp/FAKE/pull/1056
* BUGFIX: Fix failure when space in temp path - https://github.com/fsharp/FAKE/pull/1076
* BUGFIX: Fix app.config files
* BUGFIX: Cache invalidate on changing fsiOptions - https://github.com/fsprojects/ProjectScaffold/issues/231

#### 4.14.0 - 12.01.2016
* NugGet automatic version increment - https://github.com/fsharp/FAKE/pull/1063
* NuGet automatic version increment - https://github.com/fsharp/FAKE/pull/1063
* Added support for the Paket pack parameter buildPlatform - https://github.com/fsharp/FAKE/pull/1066
* Added possibility to bulk update assembly infos with file includes - https://github.com/fsharp/FAKE/pull/1067

Expand Down
10 changes: 6 additions & 4 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ if errorlevel 1 (
exit /b %errorlevel%
)

SET TARGET=Default
SET FAKE_PATH=packages\build\FAKE\tools\Fake.exe

IF NOT [%1]==[] (SET TARGET=%~1)

"packages\build\FAKE\tools\Fake.exe" "build.fsx" "target="%TARGET%""
IF [%1]==[] (
"%FAKE_PATH%" "build.fsx" "Default"
) ELSE (
"%FAKE_PATH%" "build.fsx" %*
)
73 changes: 71 additions & 2 deletions build.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#I @"packages/build/FAKE/tools/"
#r @"FakeLib.dll"
#r @"packages/Mono.Cecil/lib/net45/Mono.Cecil.dll"
#I "packages/build/SourceLink.Fake/tools/"
#load "packages/build/SourceLink.Fake/tools/SourceLink.fsx"

open Fake
Expand Down Expand Up @@ -50,6 +52,21 @@ Target "Clean" (fun _ -> CleanDirs [buildDir; testDir; docsDir; apidocsDir; nuge

open Fake.AssemblyInfoFile

Target "RenameFSharpCompilerService" (fun _ ->
for framework in ["net40"; "net45"] do
let dir = __SOURCE_DIRECTORY__ </> "packages/FSharp.Compiler.Service/lib" </> framework
let targetFile = dir </> "FAKE.FSharp.Compiler.Service.dll"
DeleteFile targetFile

let reader = new Mono.Cecil.DefaultAssemblyResolver()
reader.AddSearchDirectory(dir)
reader.AddSearchDirectory(__SOURCE_DIRECTORY__ </> "packages/FSharp.Core/lib/net40")
let readerParams = new Mono.Cecil.ReaderParameters(AssemblyResolver = reader)
let asem = Mono.Cecil.AssemblyDefinition.ReadAssembly(dir </> "FSharp.Compiler.Service.dll", readerParams)
asem.Name <- new Mono.Cecil.AssemblyNameDefinition("FAKE.FSharp.Compiler.Service", new System.Version(1,0,0,0))
asem.Write(dir </> "FAKE.FSharp.Compiler.Service.dll")
)

Target "SetAssemblyInfo" (fun _ ->
let common = [
Attribute.Product "FAKE - F# Make"
Expand Down Expand Up @@ -120,7 +137,8 @@ Target "GenerateDocs" (fun _ ->
++ "./build/FakeLib.dll"
-- "./build/**/Fake.Experimental.dll"
-- "./build/**/FSharp.Compiler.Service.dll"
-- "./build/**/Fake.IIS.dll"
-- "./build/**/FAKE.FSharp.Compiler.Service.dll"
-- "./build/**/Fake.IIS.dll"
-- "./build/**/Fake.Deploy.Lib.dll"

CreateDocsForDlls apidocsDir templatesDir (projInfo @ ["--libDirs", "./build"]) (githubLink + "/blob/master") dllFiles
Expand Down Expand Up @@ -149,6 +167,44 @@ Target "Test" (fun _ ->
|> xUnit id
)

Target "Bootstrap" (fun _ ->
let buildScript = "build.fsx"
let testScript = "testbuild.fsx"
// Check if we can build ourself with the new binaries.
let test clearCache script =
let clear () =
// Will make sure the test call actually compiles the script.
// Note: We cannot just clean .fake here as it might be locked by the currently executing code :)
if Directory.Exists ".fake" then
Directory.EnumerateFiles(".fake")
|> Seq.filter (fun s -> (Path.GetFileName s).StartsWith script)
|> Seq.iter File.Delete
let executeTarget target =
if clearCache then clear ()
ExecProcess (fun info ->
info.FileName <- "build/FAKE.exe"
info.WorkingDirectory <- "."
info.Arguments <- sprintf "%s %s -pd" script target) (System.TimeSpan.FromMinutes 3.0)

let result = executeTarget "PrintColors"
if result <> 0 then failwith "Bootstrapping failed"

let result = executeTarget "FailFast"
if result = 0 then failwith "Bootstrapping failed"

// Replace the include line to use the newly build FakeLib, otherwise things will be weird.
File.ReadAllText buildScript
|> fun s -> s.Replace("#I @\"packages/build/FAKE/tools/\"", "#I @\"build/\"")
|> fun text -> File.WriteAllText(testScript, text)

try
// Will compile the script.
test true testScript
// Will use the compiled/cached version.
test false testScript
finally File.Delete(testScript)
)

Target "SourceLink" (fun _ ->
!! "src/app/**/*.fsproj"
|> Seq.iter (fun f ->
Expand Down Expand Up @@ -287,15 +343,28 @@ Target "Release" (fun _ ->
Branches.tag "" release.NugetVersion
Branches.pushTag "" "origin" release.NugetVersion
)

open System
Target "PrintColors" (fun s ->
let color (color: ConsoleColor) (code : unit -> _) =
let before = Console.ForegroundColor
try
Console.ForegroundColor <- color
code ()
finally
Console.ForegroundColor <- before
color ConsoleColor.Magenta (fun _ -> printfn "TestMagenta")
)
Target "FailFast" (fun _ -> failwith "fail fast")
Target "Default" DoNothing

// Dependencies
"Clean"
==> "RenameFSharpCompilerService"
==> "SetAssemblyInfo"
==> "BuildSolution"
//==> "ILRepack"
==> "Test"
==> "Bootstrap"
==> "Default"
==> "CopyLicense"
=?> ("GenerateDocs", isLocalBuild && not isLinux)
Expand Down
2 changes: 2 additions & 0 deletions help/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ to automatically deploy a preconfigured virtual machine. See the [Vagrant docs](

* Add a bit of documentation (see above).

* Run the build script again, to confirm that all tests pass.

* Commit and push to your fork.

* Use GitHub's UI to create a pull request.
Expand Down
8 changes: 4 additions & 4 deletions help/fluentmigrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Usually your FAKE setup will look as follows:
open Fake.FluentMigratorHelper

// Assemblies with migrations
let assemblies = ["Migrations.dll"]
let assembly = "Migrations.dll"

// Using SQL Server 2014 LocalDB
let connection =
Expand All @@ -27,11 +27,11 @@ Usually your FAKE setup will look as follows:
// Specify additional options or just use the defaults
let options = {DefaultMigrationOptions with Profile="Staging"; Tags = ["US"; "Canada"]}

Target "Build" (fun _
Target "Build" (fun _ ->
// Build your Migrations.dll assembly using MSBuild or whatever
)

Target "MigrateDatabase" (fun _
Target "MigrateDatabase" (fun _ ->
MigrateToLatest connection [assembly] options
)

Expand Down Expand Up @@ -87,4 +87,4 @@ The following drivers are supported:

## Advanced usage

For advanced usage see the [source code](https://github.com/fsharp/FAKE/blob/master/src/app/Fake.FluentMigrator/FluentMigratorHelper.fs).
For advanced usage see the [source code](https://github.com/fsharp/FAKE/blob/master/src/app/Fake.FluentMigrator/FluentMigratorHelper.fs).
7 changes: 0 additions & 7 deletions help/fsc.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ The `Fsc` task can be used in standard FAKE targets:
open Fake
open Fake.FscHelper

Target "Something.dll" (fun _ ->
!! "src/**/*.fs"
|> Fsc (fun p ->
{ p with Output = "Something.dll"
FscTarget = Library })
)

Target "Otherthing.dll" (fun _ ->
["Otherthing.fs"; "Otherthing2.fs"]
|> Fsc (fun p -> { p with FscTarget = Library })
Expand Down
7 changes: 4 additions & 3 deletions modules/Octokit/Octokit.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#I __SOURCE_DIRECTORY__
#I @"../../../../../packages/Octokit/lib/net45"
#I @"../../packages/Octokit/lib/net45"
#I @"../../../../../../packages/build/Octokit/lib/net45"
#r "System.Net.Http"
#r "Octokit.dll"
Expand Down Expand Up @@ -98,7 +99,7 @@ let private makeRelease draft owner project version prerelease (notes:seq<string
data.Body <- String.Join(Environment.NewLine, notes)
data.Draft <- draft
data.Prerelease <- prerelease
let! draft = Async.AwaitTask <| client'.Release.Create(owner, project, data)
let! draft = Async.AwaitTask <| client'.Repository.Release.Create(owner, project, data)
let draftWord = if data.Draft then " draft" else ""
printfn "Created%s release id %d" draftWord draft.Id
return {
Expand All @@ -116,7 +117,7 @@ let uploadFile fileName (draft : Async<Draft>) =
let fi = FileInfo(fileName)
let archiveContents = File.OpenRead(fi.FullName)
let assetUpload = new ReleaseAssetUpload(fi.Name,"application/octet-stream",archiveContents,Nullable<TimeSpan>())
let! asset = Async.AwaitTask <| draft'.Client.Release.UploadAsset(draft'.DraftRelease, assetUpload)
let! asset = Async.AwaitTask <| draft'.Client.Repository.Release.UploadAsset(draft'.DraftRelease, assetUpload)
printfn "Uploaded %s" asset.Name
return draft'
}
Expand All @@ -132,6 +133,6 @@ let releaseDraft (draft : Async<Draft>) =
retryWithArg 5 draft <| fun draft' -> async {
let update = draft'.DraftRelease.ToUpdate()
update.Draft <- Nullable<bool>(false)
let! released = Async.AwaitTask <| draft'.Client.Release.Edit(draft'.Owner, draft'.Project, draft'.DraftRelease.Id, update)
let! released = Async.AwaitTask <| draft'.Client.Repository.Release.Edit(draft'.Owner, draft'.Project, draft'.DraftRelease.Id, update)
printfn "Released %d on github" released.Id
}
Loading

0 comments on commit 44bed1e

Please sign in to comment.