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

Using dotnet publish to find refs for docs #219

Merged
merged 14 commits into from
Oct 28, 2020
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
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"isRoot": true,
"tools": {
"fake-cli": {
"version": "5.20.0",
"version": "5.20.3",
"commands": [
"fake"
]
},
"paket": {
"version": "5.245.1",
"version": "5.251.0",
"commands": [
"paket"
]
}
}
}
}
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
dotnet: [3.1.100]
# macOS-latest has issues with always using the latest sdk even when global.json is provided
os: [ubuntu-latest, windows-latest]
dotnet: [3.1.302]
runs-on: ${{ matrix.os }}

steps:
Expand Down
6 changes: 3 additions & 3 deletions Content/Console/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
]
},
"fake-cli": {
"version": "5.20.0",
"version": "5.20.3",
"commands": [
"fake"
]
},
"paket": {
"version": "5.245.1",
"version": "5.251.0",
"commands": [
"paket"
]
Expand All @@ -33,4 +33,4 @@
]
}
}
}
}
2 changes: 1 addition & 1 deletion Content/Console/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
dotnet: [3.1.100]
dotnet: [3.1.302]
runs-on: ${{ matrix.os }}

steps:
Expand Down
5 changes: 5 additions & 0 deletions Content/Console/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "3.1.302"
}
}
24 changes: 12 additions & 12 deletions Content/Console/paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ group Build
source https://www.nuget.org/api/v2
source https://api.nuget.org/v3/index.json
nuget Argu
nuget Fake.IO.FileSystem 5.20.0
nuget Fake.Core.Target 5.20.0
nuget Fake.Core.ReleaseNotes 5.20.0
nuget FAKE.Core.Environment 5.20.0
nuget Fake.DotNet.Cli 5.20.0
nuget FAKE.Core.Process 5.20.0
nuget Fake.DotNet.AssemblyInfoFile 5.20.0
nuget Fake.Tools.Git 5.20.0
nuget Fake.DotNet.Paket 5.20.0
nuget Fake.Api.GitHub 5.20.0
nuget Fake.BuildServer.AppVeyor 5.20.0
nuget Fake.BuildServer.Travis 5.20.0
nuget Fake.IO.FileSystem 5.20.3
nuget Fake.Core.Target 5.20.3
nuget Fake.Core.ReleaseNotes 5.20.3
nuget FAKE.Core.Environment 5.20.3
nuget Fake.DotNet.Cli 5.20.3
nuget FAKE.Core.Process 5.20.3
nuget Fake.DotNet.AssemblyInfoFile 5.20.3
nuget Fake.Tools.Git 5.20.3
nuget Fake.DotNet.Paket 5.20.3
nuget Fake.Api.GitHub 5.20.3
nuget Fake.BuildServer.AppVeyor 5.20.3
nuget Fake.BuildServer.Travis 5.20.3
nuget Fantomas

group Analyzers
Expand Down
956 changes: 453 additions & 503 deletions Content/Console/paket.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Content/Library/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
]
},
"fake-cli": {
"version": "5.20.0",
"version": "5.20.3",
"commands": [
"fake"
]
},
"paket": {
"version": "5.245.1",
"version": "5.251.0",
"commands": [
"paket"
]
Expand All @@ -39,4 +39,4 @@
]
}
}
}
}
2 changes: 1 addition & 1 deletion Content/Library/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
dotnet: [3.1.100]
dotnet: [3.1.302]
runs-on: ${{ matrix.os }}

steps:
Expand Down
14 changes: 0 additions & 14 deletions Content/Library/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -626,18 +626,6 @@ let buildDocs _ =
DocsTool.build ()

let watchDocs _ =
let watchBuild () =
!! srcGlob
|> Seq.map(fun proj -> fun () ->
dotnet.watch
(fun opt ->
opt |> DotNet.Options.withWorkingDirectory (IO.Path.GetDirectoryName proj))
"build"
""
|> ignore
)
|> Seq.iter (invokeAsync >> Async.Catch >> Async.Ignore >> Async.Start)
watchBuild ()
DocsTool.watch ()

let releaseDocs ctx =
Expand Down Expand Up @@ -699,13 +687,11 @@ Target.create "ReleaseDocs" releaseDocs
"UpdateChangelog" ?=> "GenerateAssemblyInfo"
"UpdateChangelog" ==> "PublishToNuGet"

"DotnetBuild" ==> "BuildDocs"
"BuildDocs" ==> "ReleaseDocs"
"BuildDocs" ?=> "PublishToNuget"
"DotnetPack" ?=> "BuildDocs"
"GenerateCoverageReport" ?=> "ReleaseDocs"

"DotnetBuild" ==> "WatchDocs"

"DotnetRestore"
==> "DotnetBuild"
Expand Down
4 changes: 3 additions & 1 deletion Content/Library/docsSrc/Tutorials/Getting_Started.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Getting Started

```fsharp
open MyLib._1
let foo = ()
let myAge = 21
let color = Say.FavoriteColor.Red
```

## Here is the path to downloading
## Here is the path to downloading

[lang=bash]
paket install MyLib.1
Expand Down
1 change: 1 addition & 0 deletions Content/Library/docsSrc/content/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ table.pre td.lines {

body {
font-family: 'Open Sans', serif;
background-color: #BADA55;
}

pre {
Expand Down
34 changes: 34 additions & 0 deletions Content/Library/docsTool/Prelude.fs
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,37 @@ module Uri =
match Uri.TryCreate(url, UriKind.Absolute) with
| (true, v) -> v
| _ -> failwithf "Bad url %s" url



module Diposeable =
open System
open Fake.Core
let dispose (d : #IDisposable) = d.Dispose()

type DisposableList =
{
Disposables : IDisposable list
} interface IDisposable with
member x.Dispose () =
x.Disposables |> List.iter(dispose)
static member Create(disposables) =
{
Disposables = disposables
} :> IDisposable

type DisposableDirectory (directory : string) =
do
Trace.tracefn "Created disposable directory %s" directory
static member Create() =
let tempPath = IO.Path.Combine(IO.Path.GetTempPath(), Guid.NewGuid().ToString("n"))
IO.Directory.CreateDirectory tempPath |> ignore

new DisposableDirectory(tempPath)
member x.Directory = directory
member x.DirectoryInfo = IO.DirectoryInfo(directory)

interface IDisposable with
member x.Dispose() =
Trace.tracefn "Deleting directory %s" directory
IO.Directory.Delete(x.Directory,true)
Loading