Dutchskull.Aspire.PolyRepo 0.3.3-alpha.81

This is a prerelease version of Dutchskull.Aspire.PolyRepo.
dotnet add package Dutchskull.Aspire.PolyRepo --version 0.3.3-alpha.81                
NuGet\Install-Package Dutchskull.Aspire.PolyRepo -Version 0.3.3-alpha.81                
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.PolyRepo" Version="0.3.3-alpha.81" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dutchskull.Aspire.PolyRepo --version 0.3.3-alpha.81                
#r "nuget: Dutchskull.Aspire.PolyRepo, 0.3.3-alpha.81"                
#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.PolyRepo as a Cake Addin
#addin nuget:?package=Dutchskull.Aspire.PolyRepo&version=0.3.3-alpha.81&prerelease

// Install Dutchskull.Aspire.PolyRepo as a Cake Tool
#tool nuget:?package=Dutchskull.Aspire.PolyRepo&version=0.3.3-alpha.81&prerelease                

Aspire.PolyRepo

Aspire.PolyRepo 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.

Installation

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

dotnet add package Dutchskull.Aspire.PolyRepo

Usage

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

Add the configuration to your App Host project.

var repository = builder.AddRepository(
    "repository",
    "https://github.com/Dutchskull/Aspire-Git.git",
    c => c.WithDefaultBranch("feature/rename_and_new_api")
        .WithTargetPath("../../repos"));

var dotnetProject = builder
    .AddProjectFromRepository("dotnetProject", repository,
        "src/Dutchskull.Aspire.PolyRepo.Web/Dutchskull.Aspire.PolyRepo.Web.csproj")
    .WithReference(cache)
    .WithReference(apiService);

var reactProject = builder
    .AddNpmAppFromRepository("reactProject", repository, "src/Dutchskull.Aspire.PolyRepo.React")
    .WithReference(cache)
    .WithReference(apiService)
    .WithHttpEndpoint(3000);

var nodeProject = builder
    .AddNodeAppFromRepository("nodeProject", repository, "src/Dutchskull.Aspire.PolyRepo.Node")
    .WithReference(cache)
    .WithReference(apiService)
    .WithHttpEndpoint(54622);

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 repository = builder.AddRepository(
    "repository",
    "https://github.com/Dutchskull/Aspire-Git.git",
    c => c.WithDefaultBranch("feature/rename_and_new_api")
        .WithTargetPath("../../repos"));

var dotnetProject = builder
    .AddProjectFromRepository("dotnetProject", repository,
        "src/Dutchskull.Aspire.PolyRepo.Web/Dutchskull.Aspire.PolyRepo.Web.csproj")
    .WithReference(cache)
    .WithReference(apiService);

var reactProject = builder
    .AddNpmAppFromRepository("reactProject", repository, "src/Dutchskull.Aspire.PolyRepo.React")
    .WithReference(cache)
    .WithReference(apiService)
    .WithHttpEndpoint(3000);

var nodeProject = builder
    .AddNodeAppFromRepository("nodeProject", repository, "src/Dutchskull.Aspire.PolyRepo.Node")
    .WithReference(cache)
    .WithReference(apiService)
    .WithHttpEndpoint(54622);

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.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.3.3-alpha.81 110 8/25/2024
0.3.3-22-git-login.1 40 10/14/2024