Skip to content

Commit

Permalink
global dotnet cli-tool
Browse files Browse the repository at this point in the history
  • Loading branch information
kblohm committed May 17, 2018
1 parent baec147 commit f66af87
Show file tree
Hide file tree
Showing 10 changed files with 438 additions and 269 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: csharp
sudo: required
dist: trusty # Ubuntu 14.04
dotnet : 2.1.4
dotnet : 2.1.300-rc1-008673
env:
- HOME=/home/travis APPDATA=/home/travis LocalAppData=/home/travis

Expand Down
15 changes: 15 additions & 0 deletions Fake.sln
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.DotNet.Fsc", "src/app/
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fake.BuildServer.GitLab", "src/app/Fake.BuildServer.GitLab/Fake.BuildServer.GitLab.fsproj", "{F778A9E5-FC1A-4934-A6B9-98C84BE9A667}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "fake-cli", "src/app/fake-cli/fake-cli.fsproj", "{9E26B2AE-856A-42B6-9670-8766919F7D25}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -871,6 +873,18 @@ Global
{F778A9E5-FC1A-4934-A6B9-98C84BE9A667}.Release|x64.Build.0 = Release|x64
{F778A9E5-FC1A-4934-A6B9-98C84BE9A667}.Release|x86.ActiveCfg = Release|x86
{F778A9E5-FC1A-4934-A6B9-98C84BE9A667}.Release|x86.Build.0 = Release|x86
{9E26B2AE-856A-42B6-9670-8766919F7D25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E26B2AE-856A-42B6-9670-8766919F7D25}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E26B2AE-856A-42B6-9670-8766919F7D25}.Debug|x64.ActiveCfg = Debug|Any CPU
{9E26B2AE-856A-42B6-9670-8766919F7D25}.Debug|x64.Build.0 = Debug|Any CPU
{9E26B2AE-856A-42B6-9670-8766919F7D25}.Debug|x86.ActiveCfg = Debug|Any CPU
{9E26B2AE-856A-42B6-9670-8766919F7D25}.Debug|x86.Build.0 = Debug|Any CPU
{9E26B2AE-856A-42B6-9670-8766919F7D25}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E26B2AE-856A-42B6-9670-8766919F7D25}.Release|Any CPU.Build.0 = Release|Any CPU
{9E26B2AE-856A-42B6-9670-8766919F7D25}.Release|x64.ActiveCfg = Release|Any CPU
{9E26B2AE-856A-42B6-9670-8766919F7D25}.Release|x64.Build.0 = Release|Any CPU
{9E26B2AE-856A-42B6-9670-8766919F7D25}.Release|x86.ActiveCfg = Release|Any CPU
{9E26B2AE-856A-42B6-9670-8766919F7D25}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -938,6 +952,7 @@ Global
{71259EF7-41FD-4068-BD85-E4C7F67EAC25} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A}
{32A82EF2-BB35-40A2-9418-904ECFC1EF47} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A}
{F778A9E5-FC1A-4934-A6B9-98C84BE9A667} = {901F162F-8925-4390-89C5-9EE2C343F744}
{9E26B2AE-856A-42B6-9670-8766919F7D25} = {901F162F-8925-4390-89C5-9EE2C343F744}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {058A0C5E-2216-4306-8AFB-0AE28320C26A}
Expand Down
8 changes: 6 additions & 2 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ nuget Fake.Windows.Chocolatey prerelease
nuget Fake.Tools.Git prerelease
nuget Mono.Cecil prerelease
nuget Suave
nuget Newtonsoft.Json
nuget Octokit //"
#endif

Expand All @@ -49,6 +50,7 @@ open System.Reflection
#r "Paket.Core.dll"
#r "packages/build/System.Net.Http/lib/net46/System.Net.Http.dll"
#r "packages/build/Octokit/lib/net45/Octokit.dll"
#r "packages/build/Newtonsoft.Json/lib/net45/Newtonsoft.Json.dll"
#I "packages/build/SourceLink.Fake/tools/"

#r "System.IO.Compression"
Expand All @@ -60,7 +62,7 @@ open System.Reflection
//let execContext = Fake.Core.Context.FakeExecutionContext.Create false "build.fsx" []
//Fake.Core.Context.setExecutionContext (Fake.Core.Context.RuntimeContext.Fake execContext)
//#endif
// #load "src/app/Fake.DotNet.FSFormatting/FSFormatting.fs"
#load "src/app/Fake.DotNet.Cli/DotNet.fs"
open System.IO
open Fake.Api
open Fake.Core
Expand Down Expand Up @@ -227,7 +229,8 @@ Trace.setBuildNumber nugetVersion
//if current |> Seq.contains CoreTracing.defaultConsoleTraceListener |> not then
// CoreTracing.setTraceListeners (CoreTracing.defaultConsoleTraceListener :: current)

let dotnetSdk = lazy DotNet.install DotNet.Release_2_1_4

let dotnetSdk = lazy DotNet.install DotNet.Release_2_1_300_RC1
let inline dtntWorkDir wd =
DotNet.Options.lift dotnetSdk.Value
>> DotNet.Options.withWorkingDirectory wd
Expand Down Expand Up @@ -348,6 +351,7 @@ let common = [
// New FAKE libraries
let dotnetAssemblyInfos =
[ "dotnet-fake", "Fake dotnet-cli command line tool"
"fake-cli", "Fake global dotnet-cli command line tool"
"Fake.Api.GitHub", "GitHub Client API Support via Octokit"
"Fake.Api.HockeyApp", "HockeyApp Integration Support"
"Fake.Api.Slack", "Slack Integration Support"
Expand Down
3 changes: 2 additions & 1 deletion help/markdown/fake-gettingstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ There are various ways to install FAKE 5

* Use it as dotnet tool: Add `<DotNetCliToolReference Include="dotnet-fake" Version="5.0.0*" />` to your dependencies and run `dotnet fake ...` instead of `fake ...`, see [this example](https://github.com/matthid/fake-bootstrap/blob/master/dotnet-fake.csproj)

* Install fake as a global dotnet tool: run `dotnet tool install fake-cli -g` to install fake globally or `dotnet tool install fake-cli --tool-path your_tool_path` to install fake into `your_tool_path`. Pass `--version` to install a specific version of fake.

* Bootstrap via shell script (fake.cmd/fake.sh),
see this [example project](https://github.com/matthid/fake-bootstrap)
<div class="alert alert-warning">
Expand All @@ -37,7 +39,6 @@ There are various ways to install FAKE 5
Once `fake` is available you can start creating your script:

* Create a new file `myscript.fsx` with the following contents:

```fsharp
#r "paket:
nuget Fake.Core.Target prerelease"
Expand Down
4 changes: 2 additions & 2 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ group Build
nuget SourceLink.Fake
nuget ILRepack
nuget RoslynTools.ReferenceAssemblies

nuget Newtonsoft.Json
github fsharp/FAKE modules/Octokit/Octokit.fsx

// [ FAKE GROUP ]
Expand Down Expand Up @@ -133,7 +133,7 @@ group NetcoreBuild
nuget Fake.Tools.Git prerelease
nuget Mono.Cecil prerelease
nuget Octokit

nuget Newtonsoft.Json
group netcore
//source https://ci.appveyor.com/nuget/paket
source https://api.nuget.org/v3/index.json
Expand Down
Loading

0 comments on commit f66af87

Please sign in to comment.