checksum
Each registry's package configuration has the configuration about checksum.
e.g. GitHub CLI
packages:
- type: github_release
repo_owner: cli
repo_name: cli
# ...
checksum:
type: github_release
asset: gh_{{trimV .Version}}_checksums.txt
file_format: regexp
algorithm: sha256
pattern:
checksum: ^(\b[A-Fa-f0-9]{64}\b)
file: "^\\b[A-Fa-f0-9]{64}\\b\\s+(\\S+)$"
e.g. ArgoCD CLI
packages:
- type: github_release
repo_owner: argoproj
repo_name: argo-cd
# ...
asset: argocd-{{.OS}}-{{.Arch}}
checksum:
type: github_release
asset: "{{.Asset}}.sha256"
file_format: raw
algorithm: sha256
enabled
You can enable or disable the checksum download by enabled attribute.
packages:
- type: github_release
repo_owner: argoproj
repo_name: argo-cd
# ...
checksum:
enabled: false
By default, checksum download is disabled.
checksum algorithm
The following algorithm are supported.
sha1(aqua >= v1.29.0)sha256sha512md5
checksum type
The following type are supported.
github_releasehttp
github_release requires the following attributes.
asset: GitHub Release Asset name. The format is a Go'stext/templatestring
http requires the following attributes.
url: Checksum file's download URL. The format is a Go'stext/templatestring
checksum file_format
The following file_format are supported.
regexpraw
regexp requires the following attributes.
pattern.checksum:pattern.file:
pattern:
checksum: ^(\b[A-Fa-f0-9]{64}\b)
file: "^\\b[A-Fa-f0-9]{64}\\b\\s+(\\S+)$"
aqua extracts pairs of checksum and asset name using regular expressions.
Extracted values are contents of the first capturing groups.
If the checksum file includes only one checksum, you can omit pattern.file.