From c16d50eb80d3f4acd505dd0e00e480cf1b9e8fe7 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Sun, 6 Aug 2023 17:03:24 -0500 Subject: [PATCH] tools: initialize useful dotslash tools Signed-off-by: Austin Seipp --- tools/bin/README.md | 44 ++++++++++++++++++++++++++++++++++++ tools/bin/diffedit3 | 55 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 tools/bin/README.md create mode 100755 tools/bin/diffedit3 diff --git a/tools/bin/README.md b/tools/bin/README.md new file mode 100644 index 00000000000..5fd9e742f9b --- /dev/null +++ b/tools/bin/README.md @@ -0,0 +1,44 @@ +# `dotslash` executables + +This directory contains various [DotSlash](https://github.com/facebook/dotslash) +executables: portable executables that are downloaded on demand. + +DotSlash lets us have our tools available on any platform without the need to +install them, in a version-controllable and repeatable way that doesn't bloat +repositories. This helps make sure developers can have consistent environments, +if they wish to opt in. + +- [Install DotSlash](https://dotslash-cli.com/docs/installation/) + - TL;DR cargo users: `cargo install dotslash` + - TL;DR nix users: `nix profile install nixpkgs#dotslash` + - TL;DR everyone else: [Download the latest release](https://github.com/facebook/dotslash/releases) + +> [!TIP] +> DotSlash files are most useful for cross-platform tools we want to provide +> _developers_ on _all_ platforms — including Windows! Some other tools +> may also be provided by e.g. Nix or Cargo. + +Once `dotslash` is somewhere in your `$PATH`, add these files to your `$PATH` +too: + +```bash +export PATH=$(jj root)/tools/bin:$PATH +``` + +Then tools like `diffedit3` will work with a small one-time startup penalty to +download the executable. + +If you're curious, just open any of the DotSlash files in this directory in +your EDITOR; they are merely simple JSON files. + +## Windows users + +Windows users need to invoke the path to the dotslash file with the `dotslash` +command: + +``` +dotslash .\tools\bin\diffedit3 +``` + +This is a technical limitation that will be alleivated in the future (once the +`windows_shim` for DotSlash is released.) \ No newline at end of file diff --git a/tools/bin/diffedit3 b/tools/bin/diffedit3 new file mode 100755 index 00000000000..a2cc648f392 --- /dev/null +++ b/tools/bin/diffedit3 @@ -0,0 +1,55 @@ +#!/usr/bin/env dotslash + +{ + "name": "diffedit3", + "platforms": { + "macos-aarch64": { + "size": 23783016, + "hash": "blake3", + "digest": "b73506352f158fd50a1b140afac65217e91ca85558c3e10ccb8ccf83b9ea1da7", + "format": "tar.gz", + "path": "diffedit3", + "providers": [ + { + "url": "https://github.com/ilyagr/diffedit3/releases/download/v0.4.0/diffedit3-v0.4.0-aarch64-apple-darwin.tar.gz", + } + ] + }, + "macos-x86_64": { + "size": 25378103, + "hash": "blake3", + "digest": "afaa1518491f47dd5f1c13a507858e4440dedef5f4ac9f6a9621fd2cf49ecb65", + "format": "tar.gz", + "path": "diffedit3", + "providers": [ + { + "url": "https://github.com/ilyagr/diffedit3/releases/download/v0.4.0/diffedit3-v0.4.0-x86_64-apple-darwin.tar.gz", + } + ] + }, + "windows-x86_64": { + "size": 20834784, + "hash": "blake3", + "digest": "d9c38ac8ec024a293740d4ddb5a7e4d8441aaf1c31003500496dd694b7b5c8eb", + "format": "zip", + "path": "diffedit3.exe", + "providers": [ + { + "url": "https://github.com/ilyagr/diffedit3/releases/download/v0.4.0/diffedit3-v0.4.0-x86_64-pc-windows-msvc.zip" + } + ] + }, + "linux-x86_64": { + "size": 3498501, + "hash": "blake3", + "digest": "84557e1409e0e4c76d80ff0758ab5995ec40dd7a151bfdef7858c54d71d43d9a", + "format": "tar.gz", + "path": "diffedit3", + "providers": [ + { + "url": "https://github.com/ilyagr/diffedit3/releases/download/v0.4.0/diffedit3-v0.4.0-x86_64-unknown-linux-musl.tar.gz" + } + ] + } + } +}