Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/gist/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ dnx gist kzu/52b115ce24c7978ddc33245d4ff840f5 dotnet rocks

View [source gist](https://gist.github.com/kzu/52b115ce24c7978ddc33245d4ff840f5).

When running different files from the same repo+ref, the download will be performed only once.
The last download etag is used to avoid downloading on each run.

<!-- #gist -->
<!-- ../../readme.md#gist -->
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
Expand Down
43 changes: 30 additions & 13 deletions src/runcs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,38 @@
Run C# code programs from git repos on GitHub, GitLab, Bitbucket and Azure DevOps.

```
Usage: [dnx] runcs REPO_REF [args]
REPO_REF Reference to remote file to run, with format [host/]owner/repo[@ref][:path]
host optional host name (default: github.com)
@ref optional branch, tag, or commit (default: default branch)
:path optional path to file in repo (default: program.cs at repo root)

Examples:
* kzu/sandbox@v1.0.0:run.cs (implied host github.com, explicit tag and file path)
* gitlab.com/kzu/sandbox@main:run.cs (all explicit parts)
* bitbucket.org/kzu/sandbox (implied ref as default branch and path as program.cs)
* kzu/sandbox (implied host github.com, ref and path defaults)

args Arguments to pass to the C# program
Usage:
[dnx] runcs <repoRef> [<appArgs>...]

Arguments:
<REPO_REF> Reference to remote file to run, with format [host/]owner/repo[@ref][:path]
host optional host name ([gist.]github.com|gitlab.com|dev.azure.com, default: github.com)
@ref optional branch, tag, or commit (default: default branch)
:path optional path to file in repo (default: program.cs at repo root)

Examples:
* kzu/sandbox@v1.0.0:run.cs (implied host github.com, explicit tag and file path)
* gitlab.com/kzu/sandbox@main:run.cs (all explicit parts)
* kzu/sandbox (implied host github.com, ref and path defaults)

<appArgs> Arguments passed to the C# program that is being run.
```

Example:

```
dnx runcs kzu/runcs@v1:run.cs dotnet rocks
```

View [source](https://github.com/kzu/runcs/blob/v1/run.cs).

> [!TIP]
> The repo does not need to be public. In that case, the same authentication
> used by your local `git` will be used to access the gist, via the Git Credential Manager.

When running different files from the same repo+ref, the download will be performed only once.
The last download etag is used to avoid downloading on each run.

<!-- #runcs -->
<!-- ../../readme.md#runcs -->
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
Expand Down