Documentation
¶
Overview ¶
Package expand substitutes environment references into build tag, arg and annotation templates. The syntax is a small, strict subset of the shell's, so every template either expands as written or fails:
${VAR} the value of VAR; unset is an error
${VAR:-default} VAR, or default when VAR is unset or empty
${VAR:offset:length} a substring of VAR (${GITHUB_SHA:0:7})
$$ a literal $
Any other $ is an error rather than a literal, so a forgotten brace fails the build instead of publishing a tag with a $ in it. PATCHY_TIMESTAMP is a built-in: a UTC yyyymmddhhmmss fixed once per run (Timestamp).
Everything here is pure; the caller supplies the lookup.
Index ¶
Constants ¶
const TimestampLayout = "20060102150405"
TimestampLayout is the built-in's format: UTC yyyymmddhhmmss.
const TimestampVar = "PATCHY_TIMESTAMP"
TimestampVar is the built-in run timestamp's name.
Variables ¶
This section is empty.