AOSC Wiki / Developer / Packaging / .
Also available in: 简体中文

AOSC Find Update Syntax

Your Guide to CHKUPDATE and Automatic Update Checking

AOSC Find Update has its syntax and configuration defined in the spec file.

The syntax is simailar to the SRCS format:

CHKUPDATE="<type>::<key1>=<value1>;<key2>=<value2>"

Where <type> is the type of the update checker, and the key-value pairs are the configurations for that update checker.

The following sections will show all available update checkers, ordered by their trustworthiness.

Update Checkers

Release Monitoring Project (Anitya)

Environment Variables:

N/A

Options:

KeyRequired?Description
idREQUIREDProject ID from Anitya's database. Click here to look up project ID.

Notes:

Example:

# LMMS
CHKUPDATE="anitya::id=1832"

GitHub API

Environment Variables: | Name | Required? | Description | |------|-----------|-------------| |GITHUB_TOKEN|REQUIRED|Your GitHub access token. Use it to authenticate with GitHub API. Click here to access them or create one.|

Options:

KeyRequired?Description
repoREQUIREDProject slug (e.g. AOSC-Dev/ciel-rs).
patternOptionalA regular expression pattern that matches the version numbers. Use this option to filter out unwanted versions (e.g. nightlies). The capture group #1 could be used to match the version number.
sort_versionOptionalSort version numbers instead of using GitHub provided order (alphabetical order of the tag name).

Example:

CHKUPDATE="github::repo=AOSC-Dev/ciel-rs"
CHKUPDATE="github::repo=AOSC-Dev/ciel-rs;pattern=\d+\.\d+\.\d+;sort_version=true"

GitLab API

Environment Variables:

N/A

Options:

KeyRequired?Description
repoREQUIREDProject slug (e.g. GNOME/fractal) or Project ID (e.g. 132).
instanceOptionalGitLab instance URL. Useful for when the project is hosted on a self-hosted GitLab server. If unspecified, this defaults to https://gitlab.com
patternOptionalA regular expression pattern that matches the version numbers. Use this option to filter out unwanted versions (e.g. nightlies). The capture group #1 could be used to match the version number.
sort_versionOptionalSort version numbers instead of using GitLab provided order (creation dates of the tags).

Example:

CHKUPDATE="gitlab::repo=fcitx/fcitx5;pattern=\d+\.\d+\.\d+;sort_version=true"
# Fractal is on GNOME's own GitLab server
CHKUPDATE="gitlab::repo=GNOME/fractal;instance=https://gitlab.gnome.org"

GitWeb Tags

Environment Variables:

N/A

Options:

KeyRequired?Description
urlREQUIREDURL to the GitWeb repository page
patternOptionalA regular expression pattern that matches the version numbers. Use this option to filter out unwanted versions (e.g. nightlies). The capture group #1 could be used to match the version number.

Notes:

Example:

CHKUPDATE="gitlab::url=https://repo.or.cz/0ad.git;pattern=^[^b]+$"

Generic Git Tags

Environment Variables:

N/A

Options:

KeyRequired?Description
urlREQUIREDURL to the Git repository clone URL (http/https only, git:// protocol unsupported)
patternOptionalA regular expression pattern that matches the version numbers. Use this option to filter out unwanted versions (e.g. nightlies). The capture group #1 could be used to match the version number.

Notes:

Example:

CHKUPDATE="git::url=https://git.tuxfamily.org/bluebird/cms.git"

Generic Webpage Matching

Environment Variables:

N/A

Options:

KeyRequired?Description
urlREQUIREDURL to the webpage in interest.
patternREQUIREDA regular expression pattern that matches the version numbers. The capture group #1 must be used to match the version number.

Notes:

Example:

CHKUPDATE="html::url=https://repo.aosc.io/misc/l10n/;pattern=zh_CN_l10n_(.+?)\\.pdf"