3 Primary and community-submitted packages for
4 [webinstall.dev](https://webinstall.dev)
8 - Should install to `./local/opt/<package>-<version>`
9 - Should not need `sudo` (except perhaps for a one-time `setcap`, etc)
10 - Follow the example of
11 <https://github.com/webinstall/packages/tree/master/ripgrep>,
12 <https://github.com/webinstall/packages/tree/master/node>, or
13 <https://github.com/webinstall/packages/tree/master/golang>
15 ## Creating an Installer
17 An install consists of 4 parts:
19 1. Generate a list of releases by OS and ARCH
20 - For a Github releases example, see `ripgrep/releases.js` and
22 2. A bash version check (to skip downloading if already installed)
23 - typically just 1 unique line of bash
24 3. A bash install (move files from the archive (zip, tar) to \$HOME/.local)
25 - also typically just 1 unique line of bash
27 - the `webi_path_add` bash function will work for bash, zsh, and fish
29 The `webinstall.dev` server uses the list of releases returned by
30 `<your-package>/releases.js` to generate a bash script with most necessary
31 variables and functions pre-defined.
33 You just fill in the blanks.
37 See `webi/template.bash`
39 These variables will be set by the server:
44 WEBI_HOST=https://webinstall.dev
45 WEBI_RELEASES=https://webinstall.dev/api/releases/example@v1?os=macos&arch=amd64&pretty=true
54 WEBI_PKG_URL=https://cdn.example.com/example-macos-amd64.tar.gz
55 WEBI_PKG_FILE=example-macos-amd64.tar.gz
59 WEBI_TMP=${WEBI_TMP:-"$(mktemp -d -t webinstall-foobar.XXXXXXXX)"}
63 webi_download # Downloads the selected release to $HOME/Downloads/<package-name>.tar.gz
64 webi_extract # Extracts the download to /tmp/<package-name>-<random>/
65 webi_path_add /new/path # Adds /new/path to PATH for bash, zsh, and fish
70 - Wrap release APIs to unify and expose
71 - [x] Golang <https://golang.org/dl/?mode=json>
72 - [x] Node <https://nodejs.org/dist/index.tab>
74 <https://storage.googleapis.com/flutter_infra/releases/releases_linux.json> -
76 <https://github.com/webinstall/packages/blob/master/flutter/versions.js>
78 - Note: do all platforms expose tar/zip releases with the same URLs?
80 - [x] github (see ripgrep)
81 - [x] gitea (see serviceman)
82 - [ ] Support git urls (i.e. `@github.com/node/node`)
83 - (maybe `ghi node/node` for github specifically)