Dutchskull.Aspire.Git 0.2.0

Additional Details

The package is renamed to Dutchskull.Aspire.PolyRepo (Dutchskull.Aspire.PolyRepo)

dotnet add package Dutchskull.Aspire.Git --version 0.2.0
NuGet\Install-Package Dutchskull.Aspire.Git -Version 0.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dutchskull.Aspire.Git" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dutchskull.Aspire.Git --version 0.2.0
#r "nuget: Dutchskull.Aspire.Git, 0.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Dutchskull.Aspire.Git as a Cake Addin
#addin nuget:?package=Dutchskull.Aspire.Git&version=0.2.0

// Install Dutchskull.Aspire.Git as a Cake Tool
#tool nuget:?package=Dutchskull.Aspire.Git&version=0.2.0

Aspire.Git

Aspire.Git is a .NET Aspire package designed to simplify the process of cloning and managing Git repositories within your .NET Aspire applications. This package allows you to configure and use Git repositories seamlessly, integrating them into your cloud-native development workflow.

Features

  • Clone Git repositories directly into your .NET Aspire application.
  • Configure repository URL, name, target path, default branch, and project path.
  • Easy integration with .NET Aspire App Host.

Roadmap

This will be updated when more features are thought off.

  • Keep git branch updated on each startup
  • Using libgit2sharp for the git management

Installation

To install the Aspire.Git package, use the .NET CLI. Run the following command in your terminal:

dotnet add package Dutchskull.Aspire.Git --version 0.1.0

Usage

To use Aspire.Git in your .NET Aspire application, follow these steps:

Add the configuration to your App Host project.

builder.AddProjectGitRepository(c => c
    .WithGitUrl("<your-git-url>")
    .WithName("<repository-name>")
    .WithCloneTargetPath("<clone-target-path>")
    .WithDefaultBranch("<default-branch>")
    .WithProjectPath("<project-path>"));

builder.AddNpmGitRepository(c => ...);

builder.AddNodeGitRepository(c => ...);

Navigate to your App Host project directory in the terminal.

Run the application using the .NET CLI or Visual Studio 2022.

dotnet run

Example

Here is an example configuration for adding a Git repository to your .NET Aspire application:

var builder = DistributedApplication.CreateBuilder(args);

var dotnetGitRepo = builder
    .AddProjectGitRepository(c => c
            .WithGitUrl("https://github.com/Dutchskull/Aspire-Git.git")
            .WithCloneTargetPath("../../repos")
            .WithProjectPath("src/Dutchskull.Aspire.Git.Web/Dutchskull.Aspire.Git.Web.csproj"),
        name: "dotnetProject")
    .WithReference(cache)
    .WithReference(apiService);

builder.Build().Run();

This configuration clones the specified Git repository into your application, making it available for further development and deployment.

Contributing Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License. See the LICENSE file for details.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.0 80 6/8/2024
0.1.1 85 6/2/2024
0.1.0 87 6/2/2024