mirror of
https://github.com/armbian/build.git
synced 2026-11-26 23:29:56 +00:00
Renovate moved the Dependency Dashboard options into an object:
dependencyDashboard: true becomes { enabled: true }.
Its config migration rewrites renovate.json5 with JSON5.stringify,
which drops every comment. The file now uses that layout with the
comments kept: without the comment lines it is byte-identical to the
migrated config, so a future migration PR shows only the comments it
would drop.
Two comment fixes: the depName note drops the fork-sync remark, and
rule 6 allows the trailing "/" that lib/tools/shellfmt.sh uses.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Igor Velkov <325961+iav@users.noreply.github.com>
108 lines
5.7 KiB
Text
108 lines
5.7 KiB
Text
{
|
||
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
|
||
extends: [
|
||
'config:recommended',
|
||
],
|
||
// Run ONLY our custom regex manager. We deliberately do NOT enable the
|
||
// github-actions / pip managers — those are owned by Dependabot
|
||
// (.github/dependabot.yml); no point duplicating it.
|
||
enabledManagers: [
|
||
'custom.regex',
|
||
],
|
||
dependencyDashboard: {
|
||
enabled: true,
|
||
},
|
||
labels: [
|
||
'dependencies',
|
||
],
|
||
timezone: 'Europe/Zagreb',
|
||
schedule: [
|
||
// Saturday, 01:00–01:59 Zagreb time
|
||
'* 1 * * 6',
|
||
],
|
||
customManagers: [
|
||
{
|
||
customType: 'regex',
|
||
managerFilePatterns: [
|
||
'/^lib/.*\\.sh$/',
|
||
],
|
||
// ════════════════════════════════════════════════════════════════
|
||
// HOW TO MAKE A PINNED TOOL VERSION TRACKED BY RENOVATE
|
||
// (read THIS, not the regex — humans are bad at reading regexes)
|
||
// ════════════════════════════════════════════════════════════════
|
||
//
|
||
// Several build scripts pin a CLI tool to a version that is then
|
||
// downloaded from GitHub Releases. Renovate keeps that pin fresh
|
||
// by opening a PR when a newer release appears. For Renovate to
|
||
// see a line, the line must look EXACTLY like this (leading tabs
|
||
// / indentation are fine):
|
||
//
|
||
// SHELLCHECK_VERSION=${SHELLCHECK_VERSION:-0.11.0} # https://github.com/koalaman/shellcheck/releases
|
||
// └──────┬─────────┘ └────────┬─────────┘└──┬──┘ └──────────────────────┬────────────────────────┘
|
||
// NAME_VERSION ${ … :- VERSION } bare single "#" + https://github.com/OWNER/REPO/releases
|
||
// (allow-listed) default-value form brace
|
||
//
|
||
// From that line Renovate takes:
|
||
// • the version ("0.11.0") → currentValue
|
||
// • OWNER/REPO from the URL → depName
|
||
// datasource is forced to github-releases; a leading "v" on the
|
||
// upstream tag (v0.11.0) is stripped automatically.
|
||
//
|
||
// Note: depName comes from the github.com URL already on the line,
|
||
// so the scripts need no extra "# renovate:" annotation.
|
||
//
|
||
// ─── STRICT RULES ───────────────────────────────────────────────
|
||
// Break ANY of these and the line is SILENTLY dropped: Renovate
|
||
// just stops tracking it, the version quietly rots, and the only
|
||
// visible sign is that the tool disappears from the Dependency
|
||
// Dashboard issue. So:
|
||
//
|
||
// 1. NAME must be in the allow-list inside `matchStrings` below
|
||
// (currently SHELLFMT | SHELLCHECK | ORAS | BATCAT). A brand
|
||
// new tool is NOT tracked until you add its NAME there. This
|
||
// is intentional — it stops Renovate from grabbing pins that
|
||
// must stay fixed (e.g. a RUST_VERSION held back on purpose).
|
||
//
|
||
// 2. The version after ":-" must be BARE digits and dots — no
|
||
// quotes, no leading "v":
|
||
// OK ${ORAS_VERSION:-1.3.2}
|
||
// BAD ${ORAS_VERSION:-"1.3.2"} ← quotes kill the match
|
||
// BAD ${ORAS_VERSION:-v1.3.2} ← leading v kills it
|
||
//
|
||
// 3. Use the default-value form ${NAME:-VERSION} — with the
|
||
// "${", the ":-", and the closing "}". A plain NAME=1.3.2
|
||
// (no braces) is NOT matched.
|
||
//
|
||
// 4. The version and its github.com URL comment MUST be on the
|
||
// same physical line. No line-continuation "\", no wrapping.
|
||
//
|
||
// 5. Between the closing "}" and the comment there may only be
|
||
// spaces/tabs. Code BEFORE the assignment is fine (indent, an
|
||
// `if`, a leading `&&`), but nothing may come AFTER the "}"
|
||
// except the comment:
|
||
// OK [[ -n $x ]] && ORAS_VERSION=${ORAS_VERSION:-1.3.2} # https://github.com/oras-project/oras/releases
|
||
// BAD ORAS_VERSION=${ORAS_VERSION:-1.3.2} && do_thing # … ← trailing code kills the match
|
||
// Keep the "# https://…/releases" comment LAST on the line.
|
||
//
|
||
// 6. The comment must be a single "#" then the canonical URL
|
||
// https://github.com/OWNER/REPO/releases (a trailing "/" is fine):
|
||
// OK # https://github.com/sharkdp/bat/releases
|
||
// BAD ## https://… ← double hash kills it
|
||
// BAD # http://github.com/… ← must be https
|
||
// BAD # see github.com/x/y ← must be https://github.com/OWNER/REPO/releases
|
||
//
|
||
// 7. To track a NEW tool: (a) write its line in the shape above,
|
||
// and (b) add its NAME to the alternation in `matchStrings`.
|
||
// ════════════════════════════════════════════════════════════════
|
||
matchStrings: [
|
||
// separator is [[:blank:]] (space/tab only, NOT \s) so the version
|
||
// and its release-URL comment must sit on ONE physical line —
|
||
// \s would also cross newlines and could grab an unrelated URL.
|
||
'\\b(?:SHELLFMT|SHELLCHECK|ORAS|BATCAT)_VERSION=\\$\\{[A-Z_]+:-(?<currentValue>[0-9][0-9.]*)\\}[[:blank:]]*#[[:blank:]]*https://github\\.com/(?<depName>[^/]+/[^/\\s]+)/releases',
|
||
],
|
||
datasourceTemplate: 'github-releases',
|
||
extractVersionTemplate: '^v?(?<version>.+)$',
|
||
versioningTemplate: 'semver',
|
||
},
|
||
],
|
||
}
|