Git Product home page Git Product logo

Comments (5)

Ellerbach avatar Ellerbach commented on August 22, 2024 3

@cathalnoonan it's done:

image

You can install each tool separately. Each tool is using its own name.

from docfx-companion-tools.

Ellerbach avatar Ellerbach commented on August 22, 2024 1

@cathalnoonan, yes definitely. Let me have a look on how to release those like this quickly.
@mtirion I will have a look at this.

from docfx-companion-tools.

Ellerbach avatar Ellerbach commented on August 22, 2024 1

And all works as expected on a Mac:

image

You can run properly the tools:

image

So @deckerbd you just need to have .NET 6.0 or higher installed and add the ~/.dotnet/tool to your path and you can enjoy all the tools!

from docfx-companion-tools.

Ellerbach avatar Ellerbach commented on August 22, 2024

Hi @deckerbd, I guess it's something we can do. Have Windows, MacOS and Linux artifact published as well. That will require to adjust a bit the workflow. On the to do list but please don't expect anything in a short period of time!

from docfx-companion-tools.

cathalnoonan avatar cathalnoonan commented on August 22, 2024

Would you consider releasing these as dotnet tools? This would be an alternative to building and publishing multi-platform builds that instead relies on the dotnet sdk installed on the consumer's machine (Windows/macOS/Linux).

The docs for creating a dotnet tool suggest adding the dotnet-tool related properties to the .csproj files, but this approach might affect the existing build process used in this repo to build/publish the .exes to chocolatey.

It's also possible to pass these dotnet-tool related properties to the dotnet pack command using the -p argument (without modifying the .csproj files). See below as an example.
https://github.com/cathalnoonan/docfx-companion-tools/blob/e5fd18e9462b3b8fe23e744e5ca25ed60fdc6f6a/pack_dotnet_tools.sh (this fork has been deleted after the issue was closed, relevant file contents copied below).

#!/usr/bin/env bash
set -e

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# Clean previous nuget packages (if they exist)
rm -rf $SCRIPT_DIR/dist/*

SOLUTION_FILES=( $SCRIPT_DIR/src/**/*.sln )
for solution_file in "${SOLUTION_FILES[@]}"
do
    solution_name=$( basename $solution_file )
    solution_name="${solution_name%.*}"

    # Use the solution name as the name of the dotnet tool
    # Pass arguments to dotnet pack so a dotnet tool is published
    dotnet pack "$solution_file" -c Release -p:PackAsTool=true -p:ToolCommandName=$solution_name -p:PackageOutputPath=$SCRIPT_DIR/dist
done

After packing the nupkgs, the packages can be pushed using dotnet nuget push (with an API key for authenticating to NuGet.org).

Assuming the tools are published to NuGet, the consumers would install the parts they need by running:

# (replace DocFxTocGenerator below with the other tools as necessary)

# Install the tool locally in the current folder
dotnet new tool-manifest
dotnet tool install DocFxTocGenerator

# Install the tool globally
dotnet tool install -g DocFxTocGenerator

from docfx-companion-tools.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.