GenHTTP icon indicating copy to clipboard operation
GenHTTP copied to clipboard

Create ResourceTree from Git

Open Kaliumhexacyanoferrat opened this issue 3 years ago • 0 comments

As a developer, I would like to access resources hosted on a git repository within my project, so that I can serve content from there.

Example

var tree = ResourceTree.FromGit("https://my.repo", "v1.0.0")
                       .Refresh(PullPolicy.Always);

Host.Create()
    .Handler(DirectoryListing.From(tree))
    .Run();

Acceptance criteria

  • The functionality is implemented in a new "GenHTTP.Modules.Git" module
  • Repositories can be accessed using SSH or HTTPS
  • Secured repositories can be specified
  • The handler performs the initial checkout on PrepareAsync
  • The repository is checked out into a local folder
  • The repository is checked out shallow, if possible
  • A checkout revision (hash, tag, branch) can be specified
  • The local state is discarded on disposal

Kaliumhexacyanoferrat avatar Dec 09 '21 07:12 Kaliumhexacyanoferrat