Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: global dotnet cli-tool #1932

Merged
merged 2 commits into from
May 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -226,7 +228,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 @@ -347,6 +350,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
7 changes: 6 additions & 1 deletion help/markdown/fake-gettingstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ 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.
<div class="alert alert-info">
<h5>INFO</h5>
<p>To install a pre-release version, you have to specify the <code>--version</code> parameter. For example <code>--version=5.0.0-rc013</code></p>
</div>

* 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 +43,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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this come from?

Copy link
Contributor Author

@kblohm kblohm May 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I #load the DotNet module directly so i can use DotNet.Release_2_1_300_RC1. If i dont add the Newtonsoft.Json the Bootstrap test fails. I can remove it and just add the new version directly and update that later.

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