Skip to content

Commit

Permalink
build: remove docfx (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
CumpsD authored Mar 12, 2023
1 parent cd969de commit d6e7cf0
Show file tree
Hide file tree
Showing 14 changed files with 4 additions and 170 deletions.
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,24 +432,6 @@ The attached build script will automatically do the following based on the conve
* Any project name ending with `.Tests` will automatically be treated as a [NBench](https://github.com/petabridge/NBench) project and will be included during the test stages of this build script; and
* Any project meeting neither of these conventions will be treated as a NuGet packaging target and its `.nupkg` file will automatically be placed in the `bin\nuget` folder upon running the `build.[cmd|sh] all` command.

### DocFx for Documentation

This solution also supports [DocFx](http://dotnet.github.io/docfx/) for generating both API documentation and articles to describe the behavior, output, and usages of your project.

All of the relevant articles you wish to write should be added to the `/docs/articles/` folder and any API documentation you might need will also appear there.

All of the documentation will be statically generated and the output will be placed in the `/docs/_site/` folder.

#### Previewing Documentation

To preview the documentation for this project, execute the following command at the root of this folder:

```
C:\> serve-docs.cmd
```

This will use the built-in `docfx.console` binary that is installed as part of the NuGet restore process from executing any of the usual `build.cmd` or `build.sh` steps to preview the fully-rendered documentation. For best results, do this immediately after calling `build.cmd buildRelease`.

### Release Notes, Version Numbers, Etc

This project will automatically populate its release notes in all of its modules via the entries written inside [`RELEASE_NOTES.md`](RELEASE_NOTES.md) and will automatically update the versions of all assemblies and NuGet packages via the metadata included inside [`Directory.Build.props`](src/Directory.Build.props).
22 changes: 0 additions & 22 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ open System.Text

open Fake
open Fake.DotNetCli
open Fake.DocFxHelper

// Information about the project for Nuget and Assembly info files
let configuration = "Release"
Expand Down Expand Up @@ -47,7 +46,6 @@ Target "Clean" (fun _ ->
CleanDir outputTests
CleanDir outputPerfTests
CleanDir outputNuGet
CleanDir "docs/_site"
)

Target "AssemblyInfo" (fun _ ->
Expand Down Expand Up @@ -177,22 +175,6 @@ Target "PublishNuget" (fun _ ->
projects |> Seq.iter (runSingleProject)
)

//--------------------------------------------------------------------------------
// Documentation
//--------------------------------------------------------------------------------
Target "DocFx" (fun _ ->
DotNetCli.Restore (fun p -> { p with Project = solutionFile })
DotNetCli.Build (fun p -> { p with Project = solutionFile; Configuration = configuration })

let docsPath = "./docs"

DocFx (fun p ->
{ p with
Timeout = TimeSpan.FromMinutes 30.0;
WorkingDirectory = docsPath;
DocFxJson = docsPath @@ "docfx.json" })
)

//--------------------------------------------------------------------------------
// Cleanup
//--------------------------------------------------------------------------------
Expand All @@ -218,7 +200,6 @@ Target "Help" <| fun _ ->
" * Nuget Create and optionally publish nugets packages"
" * RunTests Runs tests"
" * All Builds, run tests, creates and optionally publish nuget packages"
" * DocFx Creates a DocFx-based website for this solution"
""
" Other Targets"
" * Help Display this help"
Expand All @@ -241,9 +222,6 @@ Target "Nuget" DoNothing
"Clean" ==> "Build" ==> "CreateNuget"
"CreateNuget" ==> "PublishNuget" ==> "Nuget"

// docs
"Clean" ==> "BuildRelease" ==> "Docfx"

// all
"BuildRelease" ==> "All"
"RunTests" ==> "All"
Expand Down
15 changes: 0 additions & 15 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Param(
$FakeVersion = "4.63.0"
$NugetVersion = "5.8.0"
$NugetUrl = "https://dist.nuget.org/win-x86-commandline/v$NugetVersion/nuget.exe"
$DocfxVersion = "2.58.9"

# Make sure tools folder exists
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
Expand Down Expand Up @@ -67,20 +66,6 @@ if (!(Test-Path $FakeExePath)) {
}
}

###########################################################################
# Docfx
###########################################################################

# Make sure Docfx has been installed.
$DocfxExePath = Join-Path $ToolPath "docfx.console/tools/docfx.exe"
if (!(Test-Path $DocfxExePath)) {
Write-Host "Installing Docfx..."
Invoke-Expression "&`"$NugetPath`" install docfx.console -ExcludeVersion -Version $DocfxVersion -OutputDirectory `"$ToolPath`"" | Out-Null;
if ($LASTEXITCODE -ne 0) {
Throw "An error occured while restoring docfx.console from NuGet."
}
}

###########################################################################
# RUN BUILD SCRIPT
###########################################################################
Expand Down
19 changes: 0 additions & 19 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ NUGET_EXE=$TOOLS_DIR/nuget.exe
NUGET_URL=https://dist.nuget.org/win-x86-commandline/v5.8.0/nuget.exe
FAKE_VERSION=4.63.0
FAKE_EXE=$TOOLS_DIR/FAKE/tools/FAKE.exe
DOCFX_VERSION=2.58.9
DOCFX_EXE=$TOOLS_DIR/docfx.console/tools/docfx.exe

# Define default arguments.
TARGET="Default"
Expand Down Expand Up @@ -70,23 +68,6 @@ if [ ! -f "$FAKE_EXE" ]; then
exit 1
fi

###########################################################################
# INSTALL DOCFX
###########################################################################
if [ ! -f "$DOCFX_EXE" ]; then
mono "$NUGET_EXE" install docfx.console -ExcludeVersion -Version $DOCFX_VERSION -OutputDirectory "$TOOLS_DIR"
if [ $? -ne 0 ]; then
echo "An error occured while installing DocFx."
exit 1
fi
fi

# Make sure that DocFx has been installed.
if [ ! -f "$DOCFX_EXE" ]; then
echo "Could not find docfx.exe at '$DOCFX_EXE'."
exit 1
fi

###########################################################################
# WORKAROUND FOR MONO
###########################################################################
Expand Down
1 change: 0 additions & 1 deletion docs/api/index.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/articles/index.md

This file was deleted.

2 changes: 0 additions & 2 deletions docs/articles/toc.yml

This file was deleted.

71 changes: 0 additions & 71 deletions docs/docfx.json

This file was deleted.

Binary file removed docs/images/icon.png
Binary file not shown.
1 change: 0 additions & 1 deletion docs/index.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/toc.yml

This file was deleted.

8 changes: 0 additions & 8 deletions docs/web.config

This file was deleted.

1 change: 0 additions & 1 deletion serve-docs.cmd

This file was deleted.

7 changes: 4 additions & 3 deletions src/Directory.Generated.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>
<PropertyGroup>
<VersionPrefix>0.0.1</VersionPrefix>
<PackageReleaseNotes>Placeholder</PackageReleaseNotes>
<VersionPrefix>1.4.28</VersionPrefix>
<PackageReleaseNotes>Perf Enhancements and fixes to failure reporting**
There was an issue found where persistence failures were being reported as rejections when they should not have. This has been fixed alongside some logic cleanup that should lead to more consistent performance.</PackageReleaseNotes>
</PropertyGroup>
</Project>
</Project>

0 comments on commit d6e7cf0

Please sign in to comment.