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 cd8df80 commit 9c4d645
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 28 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
28 changes: 6 additions & 22 deletions tools/docgen.cmd
Original file line number Diff line number Diff line change
@@ -1,32 +1,16 @@
@echo off

REM NativeLand Copyright (C) 2023 Aptivi
REM
REM This file is part of NativeLand
REM
REM NativeLand is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM
REM NativeLand is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
REM along with this program. If not, see <https://www.gnu.org/licenses/>.

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 9c4d645

Please sign in to comment.