Skip to content

Commit

Permalink
Merge pull request #2116 from fsharp/release/next
Browse files Browse the repository at this point in the history
Release 5.8.4
  • Loading branch information
matthid authored Oct 8, 2018
2 parents 16fa008 + 2836830 commit a11e478
Show file tree
Hide file tree
Showing 34 changed files with 353 additions and 148 deletions.
15 changes: 0 additions & 15 deletions Fake.sln
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Core.Vault", "src\app\
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Installer.Squirrel", "src\app\Fake.Installer.Squirrel\Fake.Installer.Squirrel.fsproj", "{3DEF2E95-4BF8-413F-930E-32103A39364A}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Sql.SqlServer", "src\app\Fake.Sql.SqlServer\Fake.Sql.SqlServer.fsproj", "{2EEAD673-45BE-4836-90B4-CF545877ACB9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1072,18 +1070,6 @@ Global
{3DEF2E95-4BF8-413F-930E-32103A39364A}.Release|x64.Build.0 = Release|Any CPU
{3DEF2E95-4BF8-413F-930E-32103A39364A}.Release|x86.ActiveCfg = Release|Any CPU
{3DEF2E95-4BF8-413F-930E-32103A39364A}.Release|x86.Build.0 = Release|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Debug|x64.ActiveCfg = Debug|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Debug|x64.Build.0 = Debug|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Debug|x86.ActiveCfg = Debug|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Debug|x86.Build.0 = Debug|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Release|Any CPU.Build.0 = Release|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Release|x64.ActiveCfg = Release|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Release|x64.Build.0 = Release|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Release|x86.ActiveCfg = Release|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1165,7 +1151,6 @@ Global
{F1641150-B89D-40B7-A3BE-9DC357410FDA} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A}
{AAAF92C5-C40D-40B8-84BA-137DF0E98B56} = {901F162F-8925-4390-89C5-9EE2C343F744}
{3DEF2E95-4BF8-413F-930E-32103A39364A} = {901F162F-8925-4390-89C5-9EE2C343F744}
{2EEAD673-45BE-4836-90B4-CF545877ACB9} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {058A0C5E-2216-4306-8AFB-0AE28320C26A}
Expand Down
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ See the [project home page](https://fake.build/) for tutorials and [API document
> - when you are on linux and do not have mono installed
> - when you are on windows and do not have Visual Studio installed
>
> Either build only the `netcore` parts via `fake build target FullDotNetCore` or install the requirements accoding to the [contributing page](http://fsharp.github.com/FAKE/contributing.html)
> Either build only the `netcore` parts via `fake build target FullDotNetCore` or install the requirements according to the [contributing page](http://fsharp.github.com/FAKE/contributing.html)
Make sure to have long path enabled: https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing
Otherwise the test-suite will fail (However, the compilation should work)
Expand Down
14 changes: 10 additions & 4 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Release Notes

## 5.8.0 - 2018-09-27
## 5.8.4 - 2018-10-08

* NEW: Fake.Sql.SqlServer module - https://github.com/fsharp/FAKE/pull/2074
* ENHANCEMENT: Some modules are now usable without FAKE context (ie. in your regular projects)
* ENHANCEMENT: Inform when the `target` environment variable is used - https://github.com/fsharp/FAKE/issues/2107
* ENHANCEMENT: Improve TeamCity support - https://github.com/fsharp/FAKE/pull/2111
* ENHANCEMENT: Update Netstandard.Library package to `2.0.3` - https://github.com/fsharp/FAKE/pull/2106
* ENHANCEMENT: Add `Process.getFileName` api to retrieve the full-path of a given process
* ENHANCEMENT: Kill existing running `dotnet.exe` processes before running the dotnet-cli installer
* BUGFIX: Environment variables are case insensitive on windows, fake will now throw exceptions if it detects invalid environment maps
* BUGFIX: MSBuild properties containing special characters lead to errors - https://github.com/fsharp/FAKE/issues/2112
* BUGFIX: Improve error message when release notes are invalid - https://github.com/fsharp/FAKE/issues/2085
* BUGFIX: Improve error message when globbing pattern is invalid - https://github.com/fsharp/FAKE/issues/2073
* BUGFIX: Do no longer provide the `--parallel` argument by default when running expecto - https://github.com/fsharp/FAKE/issues/2039
* DOCS: Fix syntax errors in dacpac docs - https://github.com/fsharp/FAKE/pull/2115

## 5.7.2 - 2018-09-24
Expand Down Expand Up @@ -109,7 +115,7 @@
* NEW: module Fake.Tools.GitVersion to interact with gitversion.exe - https://github.com/fsharp/FAKE/pull/1988
* ENHANCEMENT: Add `traceImportantf` and `traceErrorf` - https://github.com/fsharp/FAKE/pull/1986
* ENHANCEMENT: Minimalize dependencies between FAKE packages - https://github.com/fsharp/FAKE/pull/1980
* ENHANCEMENT: Change chocolatey package accoding to feedback - https://github.com/fsharp/FAKE/pull/1983
* ENHANCEMENT: Change chocolatey package according to feedback - https://github.com/fsharp/FAKE/pull/1983
* BUGFIX: Fix locating kudusync.cmd in Fake.Azure.Kudu - https://github.com/fsharp/FAKE/pull/1995
* NEW: module Fake.Core.UserInput - https://github.com/fsharp/FAKE/pull/1997

Expand Down Expand Up @@ -144,7 +150,7 @@

## 5.0.0-rc017 - 2018-05-22

* BREAKING: Add some `[<RequireQualifiedAccess>]` attributes accoding to API-Guidelines (Target, Globbing, AssemblyInfoFile)
* BREAKING: Add some `[<RequireQualifiedAccess>]` attributes according to API-Guidelines (Target, Globbing, AssemblyInfoFile)
* ENHANCEMENT: Mark `Target.DoNothing` as obsolete
* ENHANCEMENT: Mark `Target.Description` as obsolete and add `Target.description`
* BUGFIX: Includes fixes from 4.64.12
Expand Down
79 changes: 56 additions & 23 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,56 @@ open Fake.Windows
open Fake.DotNet
open Fake.DotNet.Testing

// WORKAROUND TEAMCITY
#if !BOOTSTRAP
module Kernel32 =
open System
open System.Text
open System.Diagnostics
open System.Runtime.InteropServices
[<DllImport("Kernel32.dll", SetLastError = true)>]
extern UInt32 QueryFullProcessImageName(IntPtr hProcess, UInt32 flags, StringBuilder text, [<Out>] UInt32& size)

let getPathToApp (proc:Process) =
let mutable nChars = 256u
let Buff = new StringBuilder(int nChars);

let success = QueryFullProcessImageName(proc.Handle, 0u, Buff, &nChars)

if (0u <> success) then
Buff.ToString()
else
let hresult = Marshal.GetHRForLastWin32Error()
Marshal.ThrowExceptionForHR hresult
"Error = " + string hresult + " when calling GetProcessImageFileName"

do
let dir =
if Environment.isUnix
then Environment.environVar "HOME" @@ ".dotnet"
else Environment.environVar "LocalAppData" @@ "Microsoft" @@ "dotnet"

let getProcessFileName (p:System.Diagnostics.Process) =
if Environment.isWindows then
Kernel32.getPathToApp p
else
p.MainModule.FileName

let dotnetExe = Path.Combine(dir, if Environment.isUnix then "dotnet" else "dotnet.exe")
if File.Exists(dotnetExe) then
System.Diagnostics.Process.GetProcesses()
|> Seq.filter (fun p ->
try
not p.HasExited
with _ -> false)
|> Seq.filter (fun p ->
try
Path.GetFullPath(getProcessFileName p).ToLowerInvariant() =
Path.GetFullPath(dotnetExe)
with _ -> false)
|> Seq.iter Process.kill
#endif

// Set this to true if you have lots of breaking changes, for small breaking changes use #if BOOTSTRAP, setting this flag will not be accepted
let disableBootstrap = false

Expand Down Expand Up @@ -95,15 +145,10 @@ let legacyDir = srcDir</>"legacy"

let nuget_exe = Directory.GetCurrentDirectory() </> "packages" </> "build" </> "NuGet.CommandLine" </> "tools" </> "NuGet.exe"

let vault =
match Vault.fromFakeEnvironmentOrNone() with
| Some v -> v
| None -> TeamFoundation.variables

let getVarOrDefault name def =
match vault.TryGet name with
| Some v -> v
| None -> Environment.environVarOrDefault name def
let vault = ``Legacy-build``.vault
let getVarOrDefault name def = ``Legacy-build``.getVarOrDefault name def
let releaseSecret replacement name = ``Legacy-build``.releaseSecret replacement name

let github_release_user = getVarOrDefault "github_release_user" "fsharp"
let nugetsource = getVarOrDefault "nugetsource" "https://www.nuget.org/api/v2/package"
Expand All @@ -113,20 +158,6 @@ let docsDomain = getVarOrDefault "docs_domain" "fake.build"
let buildLegacy = System.Boolean.Parse(getVarOrDefault "BuildLegacy" "false")
let fromArtifacts = not <| String.isNullOrEmpty artifactsDir

let mutable secrets = []
let releaseSecret replacement name =
let secret =
lazy
let env =
match getVarOrDefault name "default_unset" with
| "default_unset" -> failwithf "variable '%s' is not set" name
| s -> s
if BuildServer.buildServer <> BuildServer.TeamFoundation then
// on TFS/VSTS the build will take care of this.
TraceSecrets.register replacement env
env
secrets <- secret :: secrets
secret

let apikey = releaseSecret "<nugetkey>" "nugetkey"
let chocoKey = releaseSecret "<chocokey>" "CHOCOLATEY_API_KEY"
Expand All @@ -140,6 +171,8 @@ BuildServer.install [
GitLab.Installer
]



let version = ``Legacy-build``.version
let simpleVersion = ``Legacy-build``.simpleVersion
let nugetVersion = ``Legacy-build``.nugetVersion
Expand Down Expand Up @@ -809,7 +842,7 @@ Target.create "DotNetCorePushChocolateyPackage" (fun _ ->
)

Target.create "CheckReleaseSecrets" (fun _ ->
for secret in secrets do
for secret in ``Legacy-build``.secrets do
secret.Force() |> ignore
)

Expand Down
54 changes: 28 additions & 26 deletions help/markdown/core-commandlineparsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,33 +55,35 @@ You can also take a look at the test-suite:
- We return the arguments in the user given order in the result map (difference to `docopt.fs`)
- We parse arguments starting with `-` as positional arguments. For example consider:

```bash
usage: prog (NAME | --foo NAME)
```bash
usage: prog (NAME | --foo NAME)

options: --foo
```

<div class="alert alert-info">
<h5>INFO</h5>
<p>Note that --foo has no argument because it was not specified in the options section!</p>
</div>

In this scenario `prog --foo 10` is parsed as `--foo` and `NAME` argument because that is the only option. However `prog --foo=10` is parsed as `NAME` argument without any `--foo` option. Usually to prefer `--foo` you should put it first in the usage string:

```bash
usage: prog (--foo NAME | NAME)

options: --foo
```

However, in this particular case it doesn't make any difference (as the options section is missing to indicate that `--foo` has an argument).

options: --foo
```
<div class="alert alert-info">
<h5>INFO</h5>
<p>Note that --foo has no argument because it was not specified in the options section!</p>
</div>

In this scenario `prog --foo 10` is parsed as `--foo` and `NAME` argument because that is the only option. However `prog --foo=10` is parsed as `NAME` argument without any `--foo` option. Usually to prefer `--foo` you should put it first in the usage string:

```bash
usage: prog (--foo NAME | NAME)

options: --foo
```

However, in this particular case it doesn't make any difference.
- `[]` is not inherited for all items, only for the group. To have all items optional use `[]` on every item. For example `usage: prog [go go]` means to have either two `go` or none. A single one is not allowed.
- We do not merge external "options" in the usage string with `[options]`. For example:

```bash
usage: prog [options] [-a]

options: -a
-b
```

Means that `-a` is actually allowed twice.
```bash
usage: prog [options] [-a]
options: -a
-b
```
Means that `-a` is actually allowed twice.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#if FAKE_DEPENDENCIES
#r "paket:
storage: none
source https://nuget.org/api/v2
source https://api.nuget.org/v3/index.json
source ../../../release/dotnetcore
//source https://ci.appveyor.com/nuget/paket
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// [ FAKE GROUP ]
group netcore
storage: none
source https://nuget.org/api/v2
source https://api.nuget.org/v3/index.json
//source https://ci.appveyor.com/nuget/paket
source https://ci.appveyor.com/nuget/fake

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#if FAKE_DEPENDENCIES
#r "paket:
source https://nuget.org/api/v2
source https://api.nuget.org/v3/index.json
source ../../../release/dotnetcore
nuget Fake.Core.Target prerelease
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#if FAKE_DEPENDENCIES
#r "paket:
storage: none
source https://nuget.org/api/v2
source https://api.nuget.org/v3/index.json
source ../../../release/dotnetcore
//source https://ci.appveyor.com/nuget/paket
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#if FAKE_DEPENDENCIES
#r "paket:
source https://nuget.org/api/v2
source https://api.nuget.org/v3/index.json
source ../../../release/dotnetcore
//source https://ci.appveyor.com/nuget/paket
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#if FAKE_DEPENDENCIES
#r "paket: storage: none"
#r "paket: source https://nuget.org/api/v2"
#r "paket: source https://api.nuget.org/v3/index.json"
#r "paket: source ../../../release/dotnetcore"
#r "paket: //source https://ci.appveyor.com/nuget/paket"
#r "paket: nuget Fake.Runtime prerelease"
#r "paket: nuget FSharp.Core prerelease"
#endif

// Issue https://github.com/fsharp/FAKE/issues/2121
System.Environment.CurrentDirectory <- System.IO.Path.GetFullPath "mydir"
failwith "runtime error"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source https://nuget.org/api/v2
source https://api.nuget.org/v3/index.json
storage: none
//source https://ci.appveyor.com/nuget/paket
source ../../../release/dotnetcore
Expand Down
32 changes: 29 additions & 3 deletions legacy-build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ let projectName = "FAKE"
let projectSummary = "FAKE - F# Make - Get rid of the noise in your build scripts."
let projectDescription = "FAKE - F# Make - is a build automation tool for .NET. Tasks and dependencies are specified in a DSL which is integrated in F#."
let authors = ["Steffen Forkmann"; "Mauricio Scheffer"; "Colin Bull"; "Matthias Dittrich"]
let github_release_user = Environment.environVarOrDefault "github_release_user" "fsharp"

// The name of the project on GitHub
let gitName = "FAKE"
Expand Down Expand Up @@ -62,8 +61,33 @@ let additionalFiles = [
"./packages/FSharp.Core/lib/net45/FSharp.Core.sigdata"
"./packages/FSharp.Core/lib/net45/FSharp.Core.optdata"]


let nugetsource = Environment.environVarOrDefault "nugetsource" "https://www.nuget.org/api/v2/package"
let vault =
match Vault.fromFakeEnvironmentOrNone() with
| Some v -> v
| None -> TeamFoundation.variables

let getVarOrDefault name def =
match vault.TryGet name with
| Some v -> v
| None -> Environment.environVarOrDefault name def

let mutable secrets = []
let releaseSecret replacement name =
let secret =
lazy
let env =
match getVarOrDefault name "default_unset" with
| "default_unset" -> failwithf "variable '%s' is not set" name
| s -> s
if BuildServer.buildServer <> BuildServer.TeamFoundation then
// on TFS/VSTS the build will take care of this.
TraceSecrets.register replacement env
env
secrets <- secret :: secrets
secret
let github_release_user = getVarOrDefault "github_release_user" "fsharp"
let nugetsource = getVarOrDefault "nugetsource" "https://www.nuget.org/api/v2/package"
let apikey = releaseSecret "<nugetkey>" "nugetkey"
let version =
let segToString = function
| PreReleaseSegment.AlphaNumeric n -> n
Expand Down Expand Up @@ -369,11 +393,13 @@ Target.create "Legacy_CreateNuGet" (fun _ ->
Target.create "Legacy_PublishNuget" (fun _ ->
// uses NugetKey environment variable.
// Timeout atm
Environment.setEnvironVar "nugetkey" apikey.Value
Paket.push(fun p ->
{ p with
PublishUrl = nugetsource
DegreeOfParallelism = 2
WorkingDir = nugetLegacyDir })
Environment.setEnvironVar "nugetkey" ""
//!! (nugetLegacyDir </> "**/*.nupkg")
//|> Seq.iter nugetPush
)
Expand Down
Loading

0 comments on commit a11e478

Please sign in to comment.