fsprojects / FAKE

FAKE - F# Make
https://fake.build
Other
1.28k stars 585 forks source link

Enhance template tests and add dotnet cli APIs for new command #2636

Closed yazeedobaid closed 2 years ago

yazeedobaid commented 2 years ago

Description

This PR enhances the code in Fake.DotNet.Cli.IntegrationTests project which test the FAKE template. The enhancement include adding a new APIs to Fake.DotNet.Cli to support dotnet new command. The APIs are as follows:

dotnet new

A usage example is as follows:

DotNet.newFromTemplate "web" id

The command available options can be found at this documentation page. The supported options are: --dry-run --force --language --name --no-update-check --output

dotnet new --install

A usage example is as follows:

DotNet.installTemplate "fake-template" id

The command available options can be found at this documentation page. The supported options are: nuget-source

dotnet new --uninstall

A usage example is as follows:

DotNet.uninstallTemplate "fake-template"

The uninstall command has no options.

Not sure if the naming of the APIs is descriptive and is good. If anyone has better ideas or suggestions. Please comment and review the changes.

Thanks

TODO

Feel free to open the PR and ask for help

yazeedobaid commented 2 years ago

TemplateIntegrationTests are failing also on this PR. Waiting for https://github.com/fsprojects/FAKE/pull/2640 to be merged.