Skip to content

Commit

Permalink
Merge branch 'release/next' of github.com:fsharp/FAKE into release/next
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid committed Aug 17, 2019
2 parents f3d62ba + 86240f2 commit c173933
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
1 change: 0 additions & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,6 @@ Target.create "PrepareArtifacts" (fun _ ->
Trace.trace "ensure artifacts."
let files =
!! (artifactsDir </> "fake-dotnetcore-*.zip")
|> GlobbingPattern.setBaseDir "C:\\" // workaround a globbing bug, remove me with 5.0.0-rc014
|> Seq.toList
Trace.tracefn "files: %A" files
files
Expand Down
1 change: 1 addition & 0 deletions help/markdown/api-slack.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Slack.sendNotification webhookUrl (fun p ->
{p with
Text = "My Slack Notification!\n<https://google.com|Click Here>!"
Channel = "@SomeoneImportant"
Username = "My Slack User"
IconEmoji = ":ghost:"
Attachments = [|
{Slack.NotificationAttachmentDefaults with
Expand Down
4 changes: 2 additions & 2 deletions src/app/Fake.Api.Slack/SlackNotification.fs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module Slack =
/// (Required) The message body
Text: string
/// Name the message will appear to be sent from. Default value: Specified in your Slack Webhook configuration.
From: string
Username: string
/// Channel to which the message will be posted. Default value: Specified in your Slack Webhook configuration.
Channel: string
/// The icon to be displayed with the message. Default value: Specified in your slack Webhook configuration.
Expand All @@ -61,7 +61,7 @@ module Slack =
/// The default Slack notification parameters
let NotificationDefaults = {
Text = ""
From = null
Username = null
Channel = null
IconURL = null
IconEmoji = null
Expand Down
27 changes: 15 additions & 12 deletions src/app/Fake.Core.Process/ProcessUtils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module ProcessUtils =

/// Searches the given directories for all occurrences of the given file name
/// [omit]
let findFiles dirs file =
let private findFilesInternal dirs file =
let files =
dirs
|> Seq.map (fun (path : string) ->
Expand All @@ -35,6 +35,18 @@ module ProcessUtils =
|> Seq.cache
files

/// Searches the given directories for all occurrences of the given file name, on windows PATHEXT is considered (and preferred when searching)
let findFiles dirs file =
// See https://unix.stackexchange.com/questions/280528/is-there-a-unix-equivalent-of-the-windows-environment-variable-pathext
if Environment.isWindows then
// Prefer PATHEXT, see https://github.com/fsharp/FAKE/issues/1911
// and https://github.com/fsharp/FAKE/issues/1899
Environment.environVarOrDefault "PATHEXT" ".COM;.EXE;.BAT"
|> String.split ';'
|> Seq.collect (fun postFix -> findFilesInternal dirs (file + postFix))
|> fun findings -> Seq.append findings (findFilesInternal dirs file)
else findFilesInternal dirs file

/// Searches the given directories for all occurrences of the given file name
/// [omit]
let tryFindFile dirs file =
Expand All @@ -54,16 +66,7 @@ module ProcessUtils =
Environment.pathDirectories
|> Seq.filter Path.isValidPath
|> Seq.append [ "." ]
|> fun path ->
// See https://unix.stackexchange.com/questions/280528/is-there-a-unix-equivalent-of-the-windows-environment-variable-pathext
if Environment.isWindows then
// Prefer PATHEXT, see https://github.com/fsharp/FAKE/issues/1911
// and https://github.com/fsharp/FAKE/issues/1899
Environment.environVarOrDefault "PATHEXT" ".COM;.EXE;.BAT"
|> String.split ';'
|> Seq.collect (fun postFix -> findFiles path (file + postFix))
|> fun findings -> Seq.append findings (findFiles path file)
else findFiles path file
|> fun dirs -> findFiles dirs file

/// Searches the current directory and the directories within the PATH
/// environment variable for the given file. If successful returns the full
Expand Down Expand Up @@ -92,4 +95,4 @@ module ProcessUtils =
let findPath fallbackValue tool =
match tryFindPath fallbackValue tool with
| Some file -> file
| None -> tool
| None -> tool
5 changes: 5 additions & 0 deletions src/app/fake-cli/runtimeconfig.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://gist.githubusercontent.com/natemcmaster/0bdee16450f8ec1823f2c11af880ceeb/raw/runtimeconfig.template.schema.json",
// '2' allows for major-version roll-forward
"rollForwardOnNoCandidateFx": 2
}

0 comments on commit c173933

Please sign in to comment.