Skip to content

Commit

Permalink
imp - Updated docfx build script to use latest version
Browse files Browse the repository at this point in the history
---

Instead of using Chocolatey, we need to use .NET tool instead.

---

Type: imp
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Mar 10, 2024
1 parent 86a9557 commit a85f831
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docgen.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: KS API Documentation
name: API Documentation

on:
push:
Expand All @@ -20,7 +20,7 @@ jobs:
with:
dotnet-version: '8.0.x'
- name: Setup DocFX
run: dotnet tool install --global docfx --version 2.75.2
run: dotnet tool install --global docfx
- name: Solution Compilation
run: dotnet build --configuration Release
- name: Generating documentation
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/prepdraft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Setup docfx
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install docfx
- name: Setup DocFX
run: dotnet tool install --global docfx
- name: Release Asset Preparation
run: |
cd tools ; ./build.cmd ; cd ..
Expand Down
11 changes: 6 additions & 5 deletions tools/docgen.cmd
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
@echo off

REM This script builds documentation and packs the artifacts.
REM This script builds the documentation and packs the artifacts. Use when you have VS installed.
for /f "tokens=* USEBACKQ" %%f in (`type version`) do set ksversion=%%f

echo Finding DocFX...
if exist %ProgramData%\chocolatey\bin\docfx.exe goto :build
echo You don't have DocFX installed. Download and install Chocolatey and DocFX.
if exist %USERPROFILE%\.dotnet\tools\docfx.exe goto :build
echo You don't have DocFX installed. Download and install .NET and DocFX.
goto :finished

:build
echo Building Documentation...
%ProgramData%\chocolatey\bin\docfx.exe "..\DocGen\docfx.json"
echo Building the documentation...
%USERPROFILE%\.dotnet\tools\docfx.exe "..\DocGen\docfx.json"
if %errorlevel% == 0 goto :success
echo There was an error trying to build documentation (%errorlevel%).
goto :finished
Expand Down

0 comments on commit a85f831

Please sign in to comment.