Skip to content

Commit

Permalink
Cosmetic: reformat Markdown files with Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
lvillani committed Dec 8, 2020
1 parent ca4c597 commit 051d4a1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ not dependent on our rules that may go against your needs.
unless it's absolutely impossible to do so. Some software (e.g. Visual Studio Code) provides
"System" and "User" installers as separate downloads. You should always choose the "System"
installer.
- **Should create a Start Menu entry**: We expect installers to create a Start Menu entry to launch
- **Should create a Start Menu entry**: We expect installers to create a Start Menu entry to launch
the application.
- **Popular**: Apps added to the registry should be reasonably popular. We won't accept entries that
seem too obscure or unmaintained unless there's strong demand for it.
Expand Down
29 changes: 12 additions & 17 deletions docs/registry.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Registry
========
# Registry

The registry file is a JSON document with a single top-level JSON object which follows the schema
described in [just-install-v4.schema.json](../just-install-v4.schema.json). This document roughly
Expand All @@ -8,41 +7,38 @@ describes the format of the registry file for humans :smile:
There are no examples in this document, [the registry file](../just-install-v4.json) itself is a
living example of what you can do.


## Top Level

The top-level JSON object must contain two keys:

* `version`: Contains the version of the registry file and is used to prompt upgrades from older
- `version`: Contains the version of the registry file and is used to prompt upgrades from older
versions of just-install. The version is bumped each time we make a backward-incompatible change
to the file format.
* `packages`: This is a JSON object. Each key represents a package name and the value is itself a
- `packages`: This is a JSON object. Each key represents a package name and the value is itself a
JSON object that contains the software version and instructions to get the installer. See "Package
Entry" below for a description.


## Package Entry

Each entry is a JSON object that must contain at least the following two keys:

* `installer`: A JSON object which describes where the installer is and how to run it once
- `installer`: A JSON object which describes where the installer is and how to run it once
downloaded. See "Installer Options" below for a description.
* `version`: The software's version. If you are adding an unversioned link that always points to the
- `version`: The software's version. If you are adding an unversioned link that always points to the
latest stable version use `latest` here.

The following key is optional:

* `skipAudit`: A boolean value that indicates whether CI should skip audits for this package. Use
- `skipAudit`: A boolean value that indicates whether CI should skip audits for this package. Use
with care.


## Installer

This JSON object must contain at least the following two keys:

* `x86`: The value is a string with the URL that must be used to download the installer. You can use
- `x86`: The value is a string with the URL that must be used to download the installer. You can use
`{{.version}}` as a placeholder for the package's version.
* `kind`: It can be one of the following:
- `kind`: It can be one of the following:
- `advancedinstaller`: Silently installs Advanced Installer packages;
- `as-is`: Will run the executable as-is;
- `copy`: Copy the file according to the `destination` parameter;
Expand All @@ -54,7 +50,7 @@ This JSON object must contain at least the following two keys:
- `zip`: [Runs](https://github.com/just-install/just-install/blob/18876192c5ed7f24a3acaa34524d3680ec17da3e/just-install.json#L66-L78)
an installer within a .zip file or [extracts](https://github.com/just-install/just-install/blob/18876192c5ed7f24a3acaa34524d3680ec17da3e/just-install.json#L216-L231)
it to a destination directory.
* `options`: A JSON object whose contents depend on the value of the `kind`, but other options are
- `options`: A JSON object whose contents depend on the value of the `kind`, but other options are
applicable to all installer types:
- `extension`: Specify a custom extension for a file, in case `just-install` isn't able to
determine it by itself ([example](https://github.com/just-install/just-install/blob/0a90135b8aaa4bdae65c63949673e57eed049294/just-install.json#L195-L208)).
Expand All @@ -74,15 +70,14 @@ under `%SystemDrive%\Shims` which will forward arguments to the original executa
This way, users do not need to add a directory for each installed program to their `%PATH%` since
they can just add `%SystemDrive%\Shims`.


## Placeholders

In some places, you can use the following placeholders:

* `{{.version}}`: This placeholder gets expanded with the package's version.
* `{{.installer}}`: This placeholder gets replaced with the absolute path to the downloaded
- `{{.version}}`: This placeholder gets expanded with the package's version.
- `{{.installer}}`: This placeholder gets replaced with the absolute path to the downloaded
installer executable.
* `{{.ENV_VAR}}`: Where `ENV_VAR` is any environment variable found on the system. All environment
- `{{.ENV_VAR}}`: Where `ENV_VAR` is any environment variable found on the system. All environment
variables are normalized to upper case so, for example, `%SystemDrive%` becomes available as
`{{.SYSTEMDRIVE}}`. One exception is `%ProgramFiles(x86)%` that gets normalized as
`{{.PROGRAMFILES_X86}}` (notice the lack of parentheses).

0 comments on commit 051d4a1

Please sign in to comment.