2020-05-04 11:46:54 +00:00
2020-04-28 00:11:18 +00:00
2020-05-04 11:46:54 +00:00
2020-05-03 03:56:22 +00:00
2020-05-04 11:46:54 +00:00
2020-05-04 11:30:42 +00:00
2020-05-02 20:43:53 +00:00
2020-05-03 03:56:22 +00:00
2020-04-28 03:42:10 +00:00
2020-05-04 11:30:42 +00:00
2020-04-28 00:11:18 +00:00
2020-05-04 11:46:54 +00:00
2020-04-27 20:52:30 +00:00
2020-04-25 13:43:57 -06:00
2020-05-04 04:29:29 -06:00

packages

Primary and community-submitted packages for webinstall.dev

Guidelines

Creating an Installer

An install consists of 4 parts:

  1. Generate a list of releases by OS and ARCH
    • For a Github releases example, see ripgrep/releases.js and _common/github.js
  2. A bash version check (to skip downloading if already installed)
    • typically just 1 unique line of bash
  3. A bash install (move files from the archive (zip, tar) to $HOME/.local)
    • also typically just 1 unique line of bash
  4. Update PATH
    • the webi_path_add bash function will work for bash, zsh, and fish

The webinstall.dev server uses the list of releases returned by <your-package>/releases.js to generate a bash script with most necessary variables and functions pre-defined.

You just fill in the blanks.

Script API

See webi/template.bash

These variables will be set by the server:

WEBI_PKG=example@v1
WEBI_NAME=example
WEBI_HOST=https://webinstall.dev
WEBI_RELEASES=https://webinstall.dev/api/releases/example@v1?os=macos&arch=amd64&pretty=true
WEBI_CSV=v1.0.2,
WEBI_VERSION=1.0.2
WEBI_MAJOR=1
WEBI_MINOR=0
WEBI_PATCH=2
WEBI_LTS=
WEBI_CHANNEL=stable
WEBI_EXT=tar
WEBI_PKG_URL=https://cdn.example.com/example-macos-amd64.tar.gz
WEBI_PKG_FILE=example-macos-amd64.tar.gz
WEBI_TMP=${WEBI_TMP:-"$(mktemp -d -t webinstall-foobar.XXXXXXXX)"}
webi_download           # Downloads the selected release to $HOME/Downloads/<package-name>.tar.gz
webi_extract            # Extracts the download to /tmp/<package-name>-<random>/
webi_path_add /new/path # Adds /new/path to PATH for bash, zsh, and fish

Roadmap

Description
Primary and community-submitted packages for webinstall.dev
Readme MPL-2.0 3.6 MiB
Languages
Shell 41.1%
PowerShell 30.2%
JavaScript 27.7%
Vim Script 1%