Add just, jj, pinch dotslash files; extract update helper
Rakefile jq update logic extracted into reusable
update_dotslash_release method shared by all three tools.
Assisted-by: Claude Opus 4.6 via pi
diff --git a/Rakefile b/Rakefile
index 91401d3c..6e77fe82 100644
--- a/Rakefile
+++ b/Rakefile
@@ -44,40 +44,41 @@ namespace :sync do
end
end
+require "json"
+require "open3"
+
+def update_dotslash_release(name:, repo:, path: name, &asset)
+ release_json, = Open3.capture2("gh", "release", "view", "--repo", repo, "--json", "tagName")
+ tag = JSON.parse(release_json)["tagName"]
+ asset_name = asset.call(tag)
+
+ url = "https://github.com/#{repo}/releases/download/#{tag}/#{asset_name}"
+ entry_json, = Open3.capture2("dotslash", "--", "create-url-entry", url)
+ entry = JSON.parse(entry_json)
+
+ platform = {
+ size: entry["size"],
+ hash: "blake3",
+ digest: entry["digest"],
+ path: path,
+ providers: [
+ { url: url },
+ { type: "github-release", repo: "https://github.com/#{repo}", tag: tag, name: asset_name },
+ ],
+ }
+ platform[:format] = entry["format"] if entry["format"] && !entry["format"].start_with?("TODO")
+
+ dotslash = { name: name, platforms: { "macos-aarch64" => platform } }
+ File.write("bin/#{name}", "#!/usr/bin/env dotslash\n\n#{JSON.pretty_generate(dotslash)}\n")
+end
+
desc "Update dotslash files from their GitHub releases"
task :update_dotslash do
sh "gh release download --repo kejadlen/pinch --pattern pinch --output bin/pinch --clobber"
- require "json"
- require "open3"
-
- # Update jq dotslash file with latest release
- release_json, = Open3.capture2("gh", "release", "view", "--repo", "jqlang/jq", "--json", "tagName,assets")
- release = JSON.parse(release_json)
- tag = release["tagName"]
- asset = release["assets"].find { |a| a["name"] == "jq-macos-arm64" }
-
- url = "https://github.com/jqlang/jq/releases/download/#{tag}/jq-macos-arm64"
- digest, = Open3.capture2("dotslash", "--", "create-url-entry", url)
- entry = JSON.parse(digest)
-
- dotslash = {
- name: "jq",
- platforms: {
- "macos-aarch64" => {
- size: entry["size"],
- hash: "blake3",
- digest: entry["digest"],
- path: "jq",
- providers: [
- { url: url },
- { type: "github-release", repo: "https://github.com/jqlang/jq", tag: tag, name: "jq-macos-arm64" },
- ],
- },
- },
- }
-
- File.write("bin/jq", "#!/usr/bin/env dotslash\n\n#{JSON.pretty_generate(dotslash)}\n")
+ update_dotslash_release(name: "jq", repo: "jqlang/jq") { "jq-macos-arm64" }
+ update_dotslash_release(name: "jj", repo: "jj-vcs/jj") { |tag| "jj-#{tag}-aarch64-apple-darwin.tar.gz" }
+ update_dotslash_release(name: "just", repo: "casey/just") { |tag| "just-#{tag}-aarch64-apple-darwin.tar.gz" }
end
desc "Upgrade neovim"
diff --git a/bin/jj b/bin/jj
new file mode 100755
index 00000000..c2cf11de
--- /dev/null
+++ b/bin/jj
@@ -0,0 +1,25 @@
+#!/usr/bin/env dotslash
+
+{
+ "name": "jj",
+ "platforms": {
+ "macos-aarch64": {
+ "size": 9539094,
+ "hash": "blake3",
+ "digest": "b02f04d09557b41e3bf0a84a0bc7421c2b67bdbabccafc3ca00773e786e8eedc",
+ "path": "jj",
+ "providers": [
+ {
+ "url": "https://github.com/jj-vcs/jj/releases/download/v0.39.0/jj-v0.39.0-aarch64-apple-darwin.tar.gz"
+ },
+ {
+ "type": "github-release",
+ "repo": "https://github.com/jj-vcs/jj",
+ "tag": "v0.39.0",
+ "name": "jj-v0.39.0-aarch64-apple-darwin.tar.gz"
+ }
+ ],
+ "format": "tar.gz"
+ }
+ }
+}
diff --git a/bin/just b/bin/just
new file mode 100755
index 00000000..e9a61eca
--- /dev/null
+++ b/bin/just
@@ -0,0 +1,25 @@
+#!/usr/bin/env dotslash
+
+{
+ "name": "just",
+ "platforms": {
+ "macos-aarch64": {
+ "size": 1693949,
+ "hash": "blake3",
+ "digest": "3c5b267ac495f91d908a92c67a5f45ee7014c6f90dc7c9ff6a1ebc6e07dbdf5d",
+ "path": "just",
+ "providers": [
+ {
+ "url": "https://github.com/casey/just/releases/download/1.46.0/just-1.46.0-aarch64-apple-darwin.tar.gz"
+ },
+ {
+ "type": "github-release",
+ "repo": "https://github.com/casey/just",
+ "tag": "1.46.0",
+ "name": "just-1.46.0-aarch64-apple-darwin.tar.gz"
+ }
+ ],
+ "format": "tar.gz"
+ }
+ }
+}
diff --git a/bin/pinch b/bin/pinch
new file mode 100644
index 00000000..87e38753
--- /dev/null
+++ b/bin/pinch
@@ -0,0 +1,25 @@
+#!/usr/bin/env dotslash
+
+{
+ "name": "pinch",
+ "platforms": {
+ "macos-aarch64": {
+ "size": 919512,
+ "hash": "blake3",
+ "digest": "d5fa8d08d16c0622c4b56af2b7adf780433e5f3f972c7040bd104694700f1320",
+ "format": "tar.gz",
+ "path": "pinch",
+ "providers": [
+ {
+ "url": "https://github.com/kejadlen/pinch/releases/download/v2026-02-19%2B5d7c190/pinch-aarch64-apple-darwin.tar.gz"
+ },
+ {
+ "type": "github-release",
+ "repo": "https://github.com/kejadlen/pinch",
+ "tag": "v2026-02-19+5d7c190",
+ "name": "pinch-aarch64-apple-darwin.tar.gz"
+ }
+ ]
+ }
+ }
+}