Skip to content

Commit

Permalink
feat: 🎸 add GitHub CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
kahirokunn committed Jun 13, 2024
1 parent 062f71f commit 06a2fd3
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
21 changes: 21 additions & 0 deletions gh/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# GitHub CLI plugin

[GitHub CLI](https://docs.github.com/ja/github-cli/github-cli/about-github-cli) plugin for [proto](https://github.com/moonrepo/proto).

## Installation

This is a community plugin and is thus not built-in to proto. In order to use it, first either add it to your global or project-based `.prototools` by running:

### Global install

```shell
proto plugin add gh "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/gh/plugin.toml" --global
proto install gh
```

### Per-project install

```shell
proto plugin add gh "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/gh/plugin.toml"
proto pin gh latest --resolve
```
31 changes: 31 additions & 0 deletions gh/plugin.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# A TOML plugin for GitHub CLI:
# https://moonrepo.dev/docs/proto/plugins#toml-plugin

name = "GitHub CLI"
type = "cli"

[platform.linux]
bin-path = "gh_{version}_linux_{arch}/bin/gh"
download-file = "gh_{version}_linux_{arch}.tar.gz"
checksum-file = "gh_{version}_checksums.txt"

[platform.macos]
bin-path = "gh_{version}_macOS_{arch}/bin/gh"
download-file = "gh_{version}_macOS_{arch}.zip"
checksum-file = "gh_{version}_checksums.txt"

[platform.windows]
bin-path = "gh_{version}_windows_{arch}/bin/gh.exe"
download-file = "gh_{version}_windows_{arch}.zip"
checksum-file = "gh_{version}_checksums.txt"

[install]
download-url = "https://github.com/cli/cli/releases/download/v{version}/{download_file}"

[install.arch]
aarch64 = "arm64"
x86_64 = "amd64"
x86 = "386"

[resolve]
git-url = "https://github.com/cli/cli"

0 comments on commit 06a2fd3

Please sign in to comment.