Skip to content

Commit c173933

Browse files
committed
Merge branch 'release/next' of github.com:fsharp/FAKE into release/next
2 parents f3d62ba + 86240f2 commit c173933

File tree

5 files changed

+23
-15
lines changed

5 files changed

+23
-15
lines changed

build.fsx

-1
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,6 @@ Target.create "PrepareArtifacts" (fun _ ->
10651065
Trace.trace "ensure artifacts."
10661066
let files =
10671067
!! (artifactsDir </> "fake-dotnetcore-*.zip")
1068-
|> GlobbingPattern.setBaseDir "C:\\" // workaround a globbing bug, remove me with 5.0.0-rc014
10691068
|> Seq.toList
10701069
Trace.tracefn "files: %A" files
10711070
files

help/markdown/api-slack.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Slack.sendNotification webhookUrl (fun p ->
2525
{p with
2626
Text = "My Slack Notification!\n<https://google.com|Click Here>!"
2727
Channel = "@SomeoneImportant"
28+
Username = "My Slack User"
2829
IconEmoji = ":ghost:"
2930
Attachments = [|
3031
{Slack.NotificationAttachmentDefaults with

src/app/Fake.Api.Slack/SlackNotification.fs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module Slack =
4343
/// (Required) The message body
4444
Text: string
4545
/// Name the message will appear to be sent from. Default value: Specified in your Slack Webhook configuration.
46-
From: string
46+
Username: string
4747
/// Channel to which the message will be posted. Default value: Specified in your Slack Webhook configuration.
4848
Channel: string
4949
/// The icon to be displayed with the message. Default value: Specified in your slack Webhook configuration.
@@ -61,7 +61,7 @@ module Slack =
6161
/// The default Slack notification parameters
6262
let NotificationDefaults = {
6363
Text = ""
64-
From = null
64+
Username = null
6565
Channel = null
6666
IconURL = null
6767
IconEmoji = null

src/app/Fake.Core.Process/ProcessUtils.fs

+15-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module ProcessUtils =
1010

1111
/// Searches the given directories for all occurrences of the given file name
1212
/// [omit]
13-
let findFiles dirs file =
13+
let private findFilesInternal dirs file =
1414
let files =
1515
dirs
1616
|> Seq.map (fun (path : string) ->
@@ -35,6 +35,18 @@ module ProcessUtils =
3535
|> Seq.cache
3636
files
3737

38+
/// Searches the given directories for all occurrences of the given file name, on windows PATHEXT is considered (and preferred when searching)
39+
let findFiles dirs file =
40+
// See https://unix.stackexchange.com/questions/280528/is-there-a-unix-equivalent-of-the-windows-environment-variable-pathext
41+
if Environment.isWindows then
42+
// Prefer PATHEXT, see https://github.com/fsharp/FAKE/issues/1911
43+
// and https://github.com/fsharp/FAKE/issues/1899
44+
Environment.environVarOrDefault "PATHEXT" ".COM;.EXE;.BAT"
45+
|> String.split ';'
46+
|> Seq.collect (fun postFix -> findFilesInternal dirs (file + postFix))
47+
|> fun findings -> Seq.append findings (findFilesInternal dirs file)
48+
else findFilesInternal dirs file
49+
3850
/// Searches the given directories for all occurrences of the given file name
3951
/// [omit]
4052
let tryFindFile dirs file =
@@ -54,16 +66,7 @@ module ProcessUtils =
5466
Environment.pathDirectories
5567
|> Seq.filter Path.isValidPath
5668
|> Seq.append [ "." ]
57-
|> fun path ->
58-
// See https://unix.stackexchange.com/questions/280528/is-there-a-unix-equivalent-of-the-windows-environment-variable-pathext
59-
if Environment.isWindows then
60-
// Prefer PATHEXT, see https://github.com/fsharp/FAKE/issues/1911
61-
// and https://github.com/fsharp/FAKE/issues/1899
62-
Environment.environVarOrDefault "PATHEXT" ".COM;.EXE;.BAT"
63-
|> String.split ';'
64-
|> Seq.collect (fun postFix -> findFiles path (file + postFix))
65-
|> fun findings -> Seq.append findings (findFiles path file)
66-
else findFiles path file
69+
|> fun dirs -> findFiles dirs file
6770

6871
/// Searches the current directory and the directories within the PATH
6972
/// environment variable for the given file. If successful returns the full
@@ -92,4 +95,4 @@ module ProcessUtils =
9295
let findPath fallbackValue tool =
9396
match tryFindPath fallbackValue tool with
9497
| Some file -> file
95-
| None -> tool
98+
| None -> tool
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://gist.githubusercontent.com/natemcmaster/0bdee16450f8ec1823f2c11af880ceeb/raw/runtimeconfig.template.schema.json",
3+
// '2' allows for major-version roll-forward
4+
"rollForwardOnNoCandidateFx": 2
5+
}

0 commit comments

Comments
 (0)