Skip to content

Commit

Permalink
Release 5.15.1 (#2341)
Browse files Browse the repository at this point in the history
Release 5.15.1
  • Loading branch information
matthid authored Jul 1, 2019
2 parents 61b83e7 + 81c7cbf commit 6594200
Show file tree
Hide file tree
Showing 71 changed files with 3,689 additions and 3,018 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
command: |
apt-get update
apt-get install -y libunwind8 libicu52 unzip wget git
wget https://github.com/fsharp/FAKE/releases/download/5.12.6/fake-dotnetcore-linux-x64.zip -O /tmp/fake-dotnetcore-linux-x64.zip
wget https://github.com/fsharp/FAKE/releases/download/5.15.1-alpha.1104/fake-dotnetcore-linux-x64.zip -O /tmp/fake-dotnetcore-linux-x64.zip
mkdir fake-dotnetcore
unzip /tmp/fake-dotnetcore-linux-x64.zip -d fake-dotnetcore || echo unzip returned $?
chmod +x $PWD/fake-dotnetcore/fake
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ tools/FSharp.Compiler.Service
tools/FSharp.Formatting.CommandTool/
tools/SourceLink.Fake
.ionide/
/integrationtests/*/temp
/.vscode/settings.json
/temp

release.cmd
Expand All @@ -73,7 +73,6 @@ paket-files/
mytemp
Samples/WebNpmGrunt/node_modules
.fake
!/integrationtests/*/before/.fake
project.lock.json

#src/app/*/any
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ do_build:
- "echo 'Package: *\nPin: origin \"archive.debian.org\"\nPin-Priority: 500' | tee -a /etc/apt/preferences.d/10-archive-pin"
- apt-get update
- apt-get install -y libunwind8 libicu52 unzip wget git
- wget https://github.com/fsharp/FAKE/releases/download/5.12.6/fake-dotnetcore-linux-x64.zip -O /tmp/fake-dotnetcore-linux-x64.zip
- wget https://github.com/fsharp/FAKE/releases/download/5.15.1-alpha.1104/fake-dotnetcore-linux-x64.zip -O /tmp/fake-dotnetcore-linux-x64.zip
- mkdir fake-dotnetcore
- unzip -n /tmp/fake-dotnetcore-linux-x64.zip -d fake-dotnetcore || echo unzip returned $?
- chmod +x $PWD/fake-dotnetcore/fake
Expand Down
5 changes: 3 additions & 2 deletions .paket/Paket.Restore.targets
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,11 @@
</PropertyGroup>

<ItemGroup>
<_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.nuspec"/>
<_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/>
</ItemGroup>

<Exec Command='$(PaketCommand) fix-nuspecs files "@(_NuspecFiles)" project-file "$(PaketProjectFile)" ' Condition="@(_NuspecFiles) != ''" />
<Exec Condition="@(_NuspecFiles) != ''" Command='$(PaketCommand) fix-nuspecs files "@(_NuspecFiles)" project-file "$(PaketProjectFile)" ' />
<Error Condition="@(_NuspecFiles) == ''" Text='Could not find nuspec files in "$(AdjustedNuspecOutputPath)" (Version: "$(PackageVersion)"), therefore we cannot call "paket fix-nuspecs" and have to error out!' />

<ConvertToAbsolutePath Condition="@(_NuspecFiles) != ''" Paths="@(_NuspecFiles)">
<Output TaskParameter="AbsolutePaths" PropertyName="NuspecFileAbsolutePath" />
Expand Down
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,29 @@
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Debug IntegrationTest",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "dotnet:build:fake-netcore.fsproj",
"program": "${workspaceRoot}/src/app/Fake.netcore/bin/Debug/netcoreapp2.1/fake.dll",
"args": [
"run",
"--nocache",
"--fsiargs",
"--debug:portable --optimize-",
"integrationtests/core-reference-fake-core-targets/temp/reference_fake-targets.fsx",
"--write-info",
"test.json"
],
"cwd": "${workspaceRoot}",
"env": {
"COMPlus_JitNoInline": "1"
},
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Run Specific Test",
"type": "coreclr",
Expand Down
2 changes: 0 additions & 2 deletions .vscode/settings.json

This file was deleted.

7 changes: 7 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release Notes

## 5.15.1 - 2019-06-30

* ENHANCEMENT: Some internal improvements in `Fake.Runtime` for Ionide - https://github.com/fsharp/FAKE/pull/2341
* ENHANCEMENT: Add new `Target.getArguments()` function in order to retrieve arguments globally - https://github.com/fsharp/FAKE/pull/2341
* BUGFIX: Make sure to detect proper code locations when using `#load` (Ionide tooling, `Fake.Core.Target`) - https://github.com/fsharp/FAKE/pull/2341
* DOCS: Consolidate getting started, recommend Ionide, add FAQ section to menu and some feature updates - https://github.com/fsharp/FAKE/pull/2341

## 5.15.0 - 2019-06-17

* ENHANCEMENT: Add `--write-info <file>` command line to `Fake.Core.Target` in order to support tooling in Ionide see https://github.com/ionide/ionide-vscode-fsharp/pull/1137 - https://github.com/fsharp/FAKE/pull/2335
Expand Down
65 changes: 38 additions & 27 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ let cleanForTests () =
!! "integrationtests/*/temp"
|> Seq.iter rmdir

Target.initEnvironment()

Target.create "WorkaroundPaketNuspecBug" (fun _ ->
// Workaround https://github.com/fsprojects/Paket/issues/2830
// https://github.com/fsprojects/Paket/issues/2689
Expand Down Expand Up @@ -395,7 +397,7 @@ Target.create "StartBootstrapBuild" (fun _ ->
match whileResult with
| Some r -> return r
| None ->
// time is up
// time is up
let! combStatus = client.Repository.Status.GetCombined(github_release_user, gitName, sha) |> Async.AwaitTask
return
match combStatus.State.Value with
Expand Down Expand Up @@ -612,9 +614,18 @@ let startWebServer () =
if portIsTaken then findPort (port + 1) else port

let port = findPort 8083

let inline (@@) a b = Suave.WebPart.concatenate a b
let mimeTypes =
Suave.Writers.defaultMimeTypesMap
@@ (function
| ".avi" -> Suave.Writers.createMimeType "video/avi" false
| ".mp4" -> Suave.Writers.createMimeType "video/mp4" false
| _ -> None)
let serverConfig =
{ Suave.Web.defaultConfig with
homeFolder = Some (Path.GetFullPath docsDir)
mimeTypesMap = mimeTypes
bindings = [ Suave.Http.HttpBinding.createSimple Suave.Http.Protocol.HTTP "127.0.0.1" port ]
}
let (>=>) = Suave.Operators.(>=>)
Expand Down Expand Up @@ -742,6 +753,14 @@ module CircleCi =
let isCircleCi = Environment.environVarAsBool "CIRCLECI"


let publishRuntime runtimeName =
let runtimeDir = sprintf "%s/Fake.netcore/%s" nugetDncDir runtimeName
let zipFile = sprintf "%s/Fake.netcore/fake-dotnetcore-%s.zip" nugetDncDir runtimeName
!! (sprintf "%s/**" runtimeDir)
|> Zip.zip runtimeDir zipFile

publish zipFile

// Create target for each runtime
let info = lazy DotNet.info dtntSmpl
runtimes
Expand Down Expand Up @@ -774,6 +793,10 @@ runtimes
let target = outDir </> "fake"
if File.Exists target then File.Delete target
File.Move(source, target)

// Create zip
if runtimeName <> "current" then
publishRuntime runtimeName
)
)
)
Expand All @@ -789,13 +812,16 @@ Target.create "_DotNetPublish_portable" (fun _ ->
Framework = Some "netcoreapp2.1"
OutputPath = Some outDir
} |> dtntSmpl) netcoreFsproj

publishRuntime "portable"
)

Target.create "_DotNetPackage" (fun _ ->
let nugetDir = System.IO.Path.GetFullPath nugetDncDir
// This line actually ensures we get the correct version checked in
// instead of the one previously bundled with 'fake`
Git.CommandHelper.gitCommand "" "checkout .paket/Paket.Restore.targets"
// This lines actually ensures we get the correct version checked in
// instead of the one previously bundled with `fake` or `paket`
callpaket "." "restore" // first make paket restire its target file if it feels like it.
Git.CommandHelper.gitCommand "" "checkout .paket/Paket.Restore.targets" // now restore ours


//Environment.setEnvironVar "IncludeSource" "true"
Expand Down Expand Up @@ -823,6 +849,14 @@ Target.create "_DotNetPackage" (fun _ ->
else c.Common
} |> dtntSmpl) "Fake.sln"

// build zip package
Directory.ensure (nugetDncDir </> "Fake.netcore")
let zipFile = nugetDncDir </> "Fake.netcore/fake-dotnetcore-packages.zip"
!! (nugetDncDir </> "*.nupkg")
-- (nugetDncDir </> "*.symbols.nupkg")
|> Zip.zip nugetDncDir zipFile
publish zipFile

// TODO: Check if we run the test in the current build!
Directory.ensure "temp"
let testZip = "temp/tests.zip"
Expand All @@ -831,26 +865,6 @@ Target.create "_DotNetPackage" (fun _ ->
publish testZip
)

Target.create "DotNetCoreCreateZipPackages" (fun _ ->
Environment.setEnvironVar "Version" nugetVersion

// build zip packages
!! (nugetDncDir </> "*.nupkg")
-- (nugetDncDir </> "*.symbols.nupkg")
|> Zip.zip nugetDncDir (nugetDncDir </> "Fake.netcore/fake-dotnetcore-packages.zip")

("portable" :: runtimes)
|> Seq.iter (fun runtime ->
let runtimeDir = sprintf "%s/Fake.netcore/%s" nugetDncDir runtime
!! (sprintf "%s/**" runtimeDir)
|> Zip.zip runtimeDir (sprintf "%s/Fake.netcore/fake-dotnetcore-%s.zip" nugetDncDir runtime)
)

runtimes @ [ "portable"; "packages" ]
|> List.map (fun n -> sprintf "%s/Fake.netcore/fake-dotnetcore-%s.zip" nugetDncDir n)
|> List.iter publish
)

let getChocoWrapper () =
let altToolPath = Path.GetFullPath "temp/choco.sh"
if not Environment.isWindows then
Expand Down Expand Up @@ -1251,8 +1265,6 @@ if buildLegacy then
// Build artifacts only (no testing)
"DotNetCoreCreateChocolateyPackage"
=?> ("BuildArtifacts", Environment.isWindows)
"DotNetCoreCreateZipPackages"
==> "BuildArtifacts"


// Test the dotnetcore build
Expand Down Expand Up @@ -1286,7 +1298,6 @@ if buildLegacy then

"DotNetPackage"
==> "TemplateIntegrationTests"
==> "DotNetCoreCreateZipPackages"
==> "FullDotNetCore"
==> "Default"

Expand Down
2 changes: 1 addition & 1 deletion fake.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<licenseUrl>https://github.com/fsharp/FAKE/blob/d86e9b5b8e7ebbb5a3d81c08d2e59518cf9d6da9/License.txt</licenseUrl>
<iconUrl>https://raw.githubusercontent.com/fsharp/FAKE/fee4f05a2ee3c646979bf753f3b1f02d927bfde9/help/content/pics/logo.png</iconUrl>
<releaseNotes>@releaseNotes@</releaseNotes>
<tags>build, fake, f#</tags>
<tags>build fake f# automation make scripting</tags>
@dependencies@
</metadata>
</package>
Binary file added help/content/pics/targets/targets-outline.mp4
Binary file not shown.
45 changes: 44 additions & 1 deletion help/markdown/core-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,49 @@ Now we have the following options:
- `fake run build.fsx -s -t Build` --> starts only the *Build* target and runs no dependencies
- `fake run build.fsx` --> starts the Deploy target (and runs the dependencies *Clean* and *Build*)
## Script with arguments
Example:
```fsharp
let args = Target.getArguments() // use this at the top of your script isntead of `Target.initEnvironment()`
// So some stuff depending on the args
match args with
| Some args ->
Trace.tracefn "Arguments: %A" args
| None ->
// This case happens when no execution is requested (for example `--list` for listing targets)
// Even for empty arguments `Some [||]` is given, read docs for `Target.GetArguments()`
// never execute any side-effects outside of targets when `None` is given.
// NOTE: IDE will only show targets defined in this code-path, so never define targets based on arguments or environment variables.
()
// Set your own variable/s based on the args
let myVerbose, myArg =
match args with
| Some args ->
// Or use Fake.Core.CommandLineParsing here: https://fake.build/core-commandlineparsing.html
args |> Seq.contains "--myverbose",
args |> Seq.contains "--arg"
| None -> false
Target.create "Default" (fun _ ->
if myArg then
printfn "do something special"
)
// Feature is opt-in in order to provide good error messages out of the box
// see https://github.com/fsharp/FAKE/issues/1896
Target.runOrDefaultWithArguments "Default"
```
Everything after the target will be interpreted as argument for the target:
- `fake run build.fsx target MyTarget --arg` --> `--arg` will be contained in `args`
- `fake build -t MyTarget --arg` --> `--arg` will be contained in `args`, because `--arg` is not a valid argument for the `Fake.Core.Target` (see command line spec above)
## Targets with arguments
Example:
Expand Down Expand Up @@ -201,7 +244,7 @@ Target.activateBuildFailure "ReportErrorViaMail"
Since multithreading is beneficial (especially for large projects) FAKE allows to specify the
number of threads used for traversing the dependency tree.
This option of course only affects independent targets whereas dependent targets will
still be exectued in order.
still be executed in order.
### Setting the number of threads
Expand Down
24 changes: 17 additions & 7 deletions help/markdown/fake-debugging.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
# Debugging of FAKE 5 build scripts

Currently debugging support (and documentation around it) is limited. Please help to improve the situation by improving the code and the docs!
We recommend [Visual Studio Code](https://code.visualstudio.com/) with the [Ionide extension](https://marketplace.visualstudio.com/items?itemName=Ionide.Ionide-fsharp) for best FAKE tooling support, including proper debugging.
The easiest way to debug a script is by using the "Debug" buttons in the FAKE targets outline

<div class="alert alert-warning">
<h5>WARNING</h5>
<p>Currently debugging via the <code>chocolatey</code> installation is not possible. This is because we currently do not distribute the x64 version on x64 versions of windows and the .NET Core debugger currently only supports x64!</p>
</div>
<video loop autoplay>
<source src="pics/targets/targets-outline.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

## Non-Ionide or no Fake.Core.Targets

If you don't use Ionide or if you don't use `Fake.Core.Targets` the Outline stays empty and you (currently) cannot run or debug via UI. Please see the following sections on how to debug and run.

## General considerations

- Run with more verbose logging `-v`
- If an error happens while restoring packages (before even running the script), consider using `-vv` or `-v -v` to increase the logging even more.

<div class="alert alert-warning">
<h5>WARNING</h5>
<p>Currently debugging via the <code>chocolatey</code> installation is not possible. This is because we currently do not distribute the x64 version on x64 versions of windows and the .NET Core debugger currently only supports x64!</p>
</div>


## Visual Studio Code && portable.zip

Debugging works (on windows) in the following way:
Expand All @@ -27,7 +37,7 @@ Debugging works (on windows) in the following way:
"type": "coreclr",
"request": "launch",
"program": "E:\\fake-dotnetcore-portable\\fake.dll",
"args": ["run", "--fsiargs", "--debug:portable --optimize-", "build.fsx"],
"args": ["run", "--nocache", "--fsiargs", "--debug:portable --optimize-", "build.fsx"],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"console": "internalConsole"
Expand All @@ -53,7 +63,7 @@ System.Console.ReadKey() |> ignore
```

- Delete `.fake` directory
- Start your build script via `dotnet fake run build.fsx --fsiargs "--debug:portable --optimize-"` and wait for the `Press any key to continue...` Message
- Start your build script via `dotnet fake run --nocache build.fsx --fsiargs "--debug:portable --optimize-"` and wait for the `Press any key to continue...` Message
- Select ".NET Core Attach" in the Visual Studio Code Debugger View
- Press play and select the `dotnet exec --depsfile ".../fake..."` process.

Expand Down
Loading

0 comments on commit 6594200

Please sign in to comment.