fleetlint Policy for a fleet of repositories
v0.4
Getting started

repo/toolchain-pinned/hugo

Toolchain version is pinned

Implements repo/toolchain-pinned for hugo.

Severitywarning
Tiers1, 2
Stackshugo
Scopeeach
Kindexpr
Sourcelibrary v0.1.0
Selected byfleetlint-recommended@v0.1.0

Requirement

The Hugo version is pinned: .tool-versions/mise naming hugo with a version, HUGO_VERSION in netlify.toml or vercel.json, or a CI file setting HUGO_VERSION, hugo-version or a versioned gohugoio/hugo image.

Why

Without a pin, every machine and every CI run builds with whatever compiler or runtime happens to be installed, and failures cannot be reproduced.

Check

["", "../", "../../", "../../../"].exists(d, file(d + ".tool-versions") && scan(d + ".tool-versions", r'^\s*(hugo|hugo-extended|gohugo)\s+\S*\d').size() > 0) || ["", "../", "../../", "../../../"].exists(d, ["mise.toml", ".mise.toml", ".config/mise.toml", ".config/mise/config.toml", "mise/config.toml"].exists(n,
     file(d + n) && scan(d + n, r'^\s*"?(hugo|hugo-extended|gohugo)"?\s*=\s*[^#\n]*\d').size() > 0))
|| ["", "../", "../../", "../../../"].exists(d, file(d + "netlify.toml") && text(d + "netlify.toml").matches(r'HUGO_VERSION\s*=\s*"v?\d')) || (file("vercel.json") && text("vercel.json").matches(r'"HUGO_VERSION"\s*:\s*"v?\d')) || workflows().exists(w, text(w).matches(r'HUGO_VERSION\s*[:=]\s*["\x27]?v?\d|hugo-version:\s*["\x27]?v?\d|gohugoio/hugo(:|@)v?\d'))

Fix

Pin Hugo in mise.toml (hugo-extended = "0.x.y") or set HUGO_VERSION in CI.

Agent instruction: Add the stack’s toolchain pin set to the version currently installed; do not upgrade the toolchain in the same change.

See: https://fleetlint.org/baseline/#hygiene, https://fleetlint.org/stacks/, https://fleetlint.org/stacks/#hugo--static-sites


Generated by fleetlint docs from catalog v0.1.0.