Skip to content

Commit

Permalink
fix #1842
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid committed Apr 7, 2018
1 parent 263be76 commit 3786261
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/legacy/FakeLib/DotNetCLIHelper.fs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// Contains a task which can be used to run dotnet CLI commands.
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
module Fake.DotNetCli

open Fake
Expand All @@ -10,11 +10,11 @@ open System.Text
open Newtonsoft.Json.Linq

/// The dotnet command name
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let commandName = "dotnet"

/// Gets the installed dotnet version
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let getVersion() =
let processResult =
ExecProcessAndReturnMessages (fun info ->
Expand All @@ -25,7 +25,7 @@ let getVersion() =
processResult.Messages |> separated ""

/// Checks wether the dotnet CLI is installed
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let isInstalled() =
try
let processResult =
Expand All @@ -38,7 +38,7 @@ let isInstalled() =
with _ -> false

/// DotNet parameters
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
[<CLIMutable>]
type CommandParams = {
/// ToolPath - usually just "dotnet"
Expand Down Expand Up @@ -70,7 +70,7 @@ let private DefaultCommandParams : CommandParams = {
/// { p with
/// TimeOut = TimeSpan.FromMinutes 10. })
/// "restore"
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let RunCommand (setCommandParams: CommandParams -> CommandParams) args =
use __ = traceStartTaskUsing "DotNet" ""

Expand All @@ -84,7 +84,7 @@ let RunCommand (setCommandParams: CommandParams -> CommandParams) args =
failwithf "dotnet command failed on %s" args

/// DotNet restore parameters
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
[<CLIMutable>]
type RestoreParams = {
/// ToolPath - usually just "dotnet"
Expand Down Expand Up @@ -130,7 +130,7 @@ let private DefaultRestoreParams : RestoreParams = {
/// (fun p ->
/// { p with
/// NoCache = true })
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let Restore (setRestoreParams: RestoreParams -> RestoreParams) =
use __ = traceStartTaskUsing "DotNet.Restore" ""

Expand All @@ -154,7 +154,7 @@ let Restore (setRestoreParams: RestoreParams -> RestoreParams) =
failwithf "Restore failed on %s" args

/// DotNet build parameters
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
[<CLIMutable>]
type BuildParams = {
/// ToolPath - usually just "dotnet"
Expand Down Expand Up @@ -208,7 +208,7 @@ let private DefaultBuildParams : BuildParams = {
/// (fun p ->
/// { p with
/// Configuration = "Release" })
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let Build (setBuildParams: BuildParams -> BuildParams) =
use __ = traceStartTaskUsing "DotNet.Build" ""

Expand All @@ -235,7 +235,7 @@ let Build (setBuildParams: BuildParams -> BuildParams) =


/// DotNet test parameters
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
[<CLIMutable>]
type TestParams = {
/// ToolPath - usually just "dotnet"
Expand Down Expand Up @@ -285,7 +285,7 @@ let private DefaultTestParams : TestParams = {
/// (fun p ->
/// { p with
/// Configuration = "Release" })
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let Test (setTestParams: TestParams -> TestParams) =
use __ = traceStartTaskUsing "DotNet.Test" ""

Expand All @@ -311,7 +311,7 @@ let Test (setTestParams: TestParams -> TestParams) =


/// DotNet pack parameters
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
[<CLIMutable>]
type PackParams = {
/// ToolPath - usually just "dotnet"
Expand Down Expand Up @@ -361,7 +361,7 @@ let private DefaultPackParams : PackParams = {
/// (fun p ->
/// { p with
/// Configuration = "Release" })
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let Pack (setPackParams: PackParams -> PackParams) =
use __ = traceStartTaskUsing "DotNet.Pack" ""

Expand All @@ -386,7 +386,7 @@ let Pack (setPackParams: PackParams -> PackParams) =
failwithf "Pack failed on %s" args

/// DotNet publish parameters
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
[<CLIMutable>]
type PublishParams = {
/// ToolPath - usually just "dotnet"
Expand Down Expand Up @@ -444,7 +444,7 @@ let private DefaultPublishParams : PublishParams = {
/// (fun p ->
/// { p with
/// Configuration = "Release" })
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let Publish (setPublishParams: PublishParams -> PublishParams) =
use __ = traceStartTaskUsing "DotNet.Publish" ""

Expand Down Expand Up @@ -473,7 +473,7 @@ let Publish (setPublishParams: PublishParams -> PublishParams) =


/// Sets version in project.json
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let SetVersionInProjectJson (version:string) fileName =
use __ = traceStartTaskUsing "DotNet.SetVersion" fileName
let original = File.ReadAllText fileName
Expand All @@ -483,12 +483,12 @@ let SetVersionInProjectJson (version:string) fileName =
if newText <> original then
File.WriteAllText(fileName,newText)

[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let mutable DotnetSDKPath = System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) </> "dotnetcore" |> FullName


/// Gets the DotNet SDK from the global.json
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let GetDotNetSDKVersionFromGlobalJson() : string =
if not (File.Exists "global.json") then
failwithf "global.json not found"
Expand All @@ -503,7 +503,7 @@ let GetDotNetSDKVersionFromGlobalJson() : string =


/// Installs the DotNet SDK locally to the given path
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead")>]
[<System.Obsolete("Please use the Fake.DotNet.Cli module instead, see https://fake.build/dotnet-cli.html for an example")>]
let InstallDotNetSDK sdkVersion =
let buildLocalPath = DotnetSDKPath </> (if isWindows then "dotnet.exe" else "dotnet")
let mutable dotnetExePath = "dotnet"
Expand Down

0 comments on commit 3786261

Please sign in to comment.