Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distribution with DotSlash? #3423

Open
maghoff opened this issue Aug 12, 2024 · 1 comment
Open

Distribution with DotSlash? #3423

maghoff opened this issue Aug 12, 2024 · 1 comment

Comments

@maghoff
Copy link

maghoff commented Aug 12, 2024

DotSlash is a distribution utility by Meta which I would like to use for micro. It is designed to be used by checking in a declarative file pointing at a binary into a repository, and this file can be used transparently by any user to invoke the binary. I would like to use this to bring with me micro to all the machines I use.

In slightly more detail, DotSlash uses a JSON file mapping host platforms (such as linux-x86_64 and macos-aarch64) to several key items, including the URL to a release archive, a secure hash of this file and the path to the executable binary inside this archive. DotSlash is then used to transparently execute the binary based on this specification, and it will download and store the binary locally automatically, as needed.

I can create such a spec file manually myself. It could also be created as a part of release builds of micro, possibly by utilizing the reusable dotslash-publish-release GitHub action. If a dotslash-file were distributed with micro, it would make upgrading easier for me, and it would enable a new distribution channel for more people.

Thanks for micro ❤️ and thanks for considering this idea 🎉

@maghoff
Copy link
Author

maghoff commented Aug 12, 2024

For reference, this is the micro dotfile I have written to get micro running on macs with different architectures and on linux:

#!/usr/bin/env dotslash

{
  "name": "micro",
  "platforms": {
    "macos-x86_64": {
      "size": 4986865,
      "hash": "blake3",
      "digest": "26992f4d72b81c19f90afed7fd8e67037f552f5947be4c7dc124118c0f5e59e2",
      "format": "tar.gz",
      "path": "micro-2.0.13/micro",
      "providers": [
        {
          "url": "https://github.com/zyedidia/micro/releases/download/v2.0.13/micro-2.0.13-osx.tar.gz"
        }
      ]
    },
    "macos-aarch64": {
      "size": 4762093,
      "hash": "blake3",
      "digest": "a5912848f8fc6dfb9e5c82536e9c1506a0c2cba38e0b9431623be7014d96b580",
      "format": "tar.gz",
      "path": "micro-2.0.13/micro",
      "providers": [
        {
          "url": "https://github.com/zyedidia/micro/releases/download/v2.0.13/micro-2.0.13-macos-arm64.tar.gz"
        }
      ]
    },
    "linux-x86_64": {
      "size": 4817531,
      "hash": "blake3",
      "digest": "e7904c28e87def949e7759db2682266252c4a26a56fadfbbed4c3e7aac02dcfb",
      "format": "tar.gz",
      "path": "micro-2.0.13/micro",
      "providers": [
        {
          "url": "https://github.com/zyedidia/micro/releases/download/v2.0.13/micro-2.0.13-linux64.tar.gz"
        }
      ]
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant