iya-sts
    Preparing search index...

    Function buildNumberFrom

    • Decides a STAMPED build's number from the environment (#1317): the UTC build instant by default, or — when STS_RELEASE is true — the BUILD_NUMBER the release names.

      Without the release flag BUILD_NUMBER is IGNORED, so a stray CI variable cannot pass an ordinary build off as a release.

      Parameters

      • env: any

        the environment to read, process.env when omitted

      • now: any

        the build instant

      Returns
          | {
              build?: undefined;
              ignored?: undefined;
              ok: boolean;
              problem: string;
              release?: undefined;
          }
          | {
              build: string;
              ignored: string;
              ok: boolean;
              problem?: undefined;
              release: boolean;
          }

      { ok: true, build, release, ignored }, where ignored is the BUILD_NUMBER that was set and not used, or { ok: false, problem } naming both variables