Skip to content

Commit

Permalink
Merge pull request #25 from appthrust/direnv
Browse files Browse the repository at this point in the history
feat: add plugin for direnv
  • Loading branch information
kahirokunn authored Jun 27, 2024
2 parents 46c6556 + bc46f4b commit ce7a2c2
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
21 changes: 21 additions & 0 deletions direnv/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# direnv plugin

[direnv](https://direnv.net/) 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 direnv "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/direnv/plugin.toml" --global
proto install direnv
```

### Per-project install

```shell
proto plugin add direnv "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/direnv/plugin.toml"
proto pin direnv latest --resolve
```
8 changes: 8 additions & 0 deletions direnv/plugin.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { run } from "../testkit.js";

run({
name: "direnv",
afterInstall: async ($) => {
await $`direnv version`;
},
});
28 changes: 28 additions & 0 deletions direnv/plugin.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# A TOML plugin for direnv:
# https://moonrepo.dev/docs/proto/plugins#toml-plugin

name = "direnv"
type = "cli"

[platform.linux]
download-file = "direnv.linux-{arch}"
checksum-file = "direnv-checksums.txt"

[platform.macos]
download-file = "direnv.darwin-{arch}"
checksum-file = "direnv-checksums.txt"

[platform.windows]
download-file = "direnv.windows-{arch}.exe"
checksum-file = "direnv-checksums.txt"

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

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

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

0 comments on commit ce7a2c2

Please sign in to comment.