diff --git a/.prototools b/.prototools index a96057b..0d0e387 100644 --- a/.prototools +++ b/.prototools @@ -10,6 +10,7 @@ deno = "1.41.2" dprint = "0.45.0" flyctl = "0.2.13" gitleaks = "8.18.2" +grain = "0.6.1" gum = "0.13.0" hurl = "4.2.0" # lacks aarch64-apple-darwin support @@ -45,6 +46,7 @@ dagger = "source:dagger/plugin.toml" dprint = "source:dprint/plugin.toml" flyctl = "source:flyctl/plugin.toml" gitleaks = "source:gitleaks/plugin.toml" +grain = "source:grain/plugin.toml" gum = "source:gum/plugin.toml" hurl = "source:hurl/plugin.toml" hyperfine = "source:hyperfine/plugin.toml" diff --git a/grain/README.md b/grain/README.md new file mode 100644 index 0000000..3762de1 --- /dev/null +++ b/grain/README.md @@ -0,0 +1,21 @@ +# Grain plugin + +[Grain](https://grain-lang.org) 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 grain "source:https://raw.githubusercontent.com/Phault/proto-toml-plugins/main/grain/plugin.toml" --global +proto install grain +``` + +## Per-project install + +```shell +proto plugin add grain "source:https://raw.githubusercontent.com/Phault/proto-toml-plugins/main/grain/plugin.toml" +proto pin grain latest --resolve +``` diff --git a/grain/plugin.toml b/grain/plugin.toml new file mode 100644 index 0000000..468eba8 --- /dev/null +++ b/grain/plugin.toml @@ -0,0 +1,25 @@ +name = "Grain" +type = "language" + +[resolve] +git-url = "https://github.com/grain-lang/grain" +version-pattern = "^grain-v((?[0-9]+)\\.(?[0-9]+)\\.(?[0-9]+)(?
-[^+]+)?)"
+
+[platform.linux]
+archs = ["x64"]
+download-file = "grain-linux-{arch}"
+
+[platform.macos]
+archs = ["x64"]
+download-file = "grain-mac-{arch}"
+
+[platform.windows]
+archs = ["x64"]
+download-file = "grain-win-{arch}.exe"
+
+[install]
+download-url = "https://github.com/grain-lang/grain/releases/download/grain-v{version}/{download_file}"
+unpack = false
+
+[install.arch]
+x86_64 = "x64"