From 9c4d645f1e41350d99eac1f09b5964710930a364 Mon Sep 17 00:00:00 2001 From: Aptivi Date: Sun, 10 Mar 2024 12:51:11 +0300 Subject: [PATCH] imp - Updated docfx build script to use latest version --- Instead of using Chocolatey, we need to use .NET tool instead. --- Type: imp Breaking: False Doc Required: False Part: 1/1 --- .github/workflows/docgen.yml | 4 ++-- .github/workflows/prepdraft.yml | 6 ++---- tools/docgen.cmd | 28 ++++++---------------------- 3 files changed, 10 insertions(+), 28 deletions(-) diff --git a/.github/workflows/docgen.yml b/.github/workflows/docgen.yml index 8b85bfd..01a74dd 100644 --- a/.github/workflows/docgen.yml +++ b/.github/workflows/docgen.yml @@ -1,4 +1,4 @@ -name: KS API Documentation +name: API Documentation on: push: @@ -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 diff --git a/.github/workflows/prepdraft.yml b/.github/workflows/prepdraft.yml index 042a1f6..e83897b 100644 --- a/.github/workflows/prepdraft.yml +++ b/.github/workflows/prepdraft.yml @@ -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 .. diff --git a/tools/docgen.cmd b/tools/docgen.cmd index a647c50..f765a41 100644 --- a/tools/docgen.cmd +++ b/tools/docgen.cmd @@ -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 . - -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