Computes a version record, marks it stamped and writes it as version.json
into a directory, so it ships with the artifact.
The build number is buildNumberFrom()'s: the build instant, or a
release's own number. A release flag without a valid number THROWS
(STS-CORE-0164) and writes nothing — that refusal is what stops an
image building; a failure to write is logged, not thrown, as it always
was.
Parameters
dir: any
the directory to write into, created if missing
env: any
optional; the environment to read STS_RELEASE and
BUILD_NUMBER from, process.env when omitted
Computes a version record, marks it stamped and writes it as version.json into a directory, so it ships with the artifact.
The build number is buildNumberFrom()'s: the build instant, or a release's own number. A release flag without a valid number THROWS (
STS-CORE-0164) and writes nothing — that refusal is what stops an image building; a failure to write is logged, not thrown, as it always was.