Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

yazeedobaid
Copy link
Collaborator

@yazeedobaid yazeedobaid commented Jan 19, 2022

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

  • New (API-)documentation for new features exist (Note: API-docs are enough, additional docs are in help/markdown)

  • unit or integration test exists (or short reasoning why it doesn't make sense)

    Note: Consider using the CreateProcess API which can be tested more easily, see https://github.com/fsharp/FAKE/pull/2131/files#diff-4fb4a77e110fbbe8210205dfe022389b for an example (the changes in the DotNet.Testing.NUnit module)

  • boy scout rule: "leave the code behind in a better state than you found it" (fix warnings, obsolete members or code-style in the places you worked in)

  • Fake 5 API guideline is honored

@yazeedobaid
Copy link
Collaborator Author

TemplateIntegrationTests are failing also on this PR. Waiting for #2640 to be merged.

…hance-template-tests-and-new-dotnet-cli-apis

� Conflicts:
�	src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs
@yazeedobaid yazeedobaid merged commit e254a94 into fsprojects:release/next Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant