// SPDX-FileCopyrightText: 2021 Staffan Olsson // // SPDX-License-Identifier: MIT package environ import "runtime" var ( // The following variables are set at build time by scripts/build.sh // GitCommit is the commit of the build GitCommit string // BuildTime is the time the exe was built BuildTime string // GoOsArch is the OS/architecture for which the exe was built GoOsArch string // Version is the git tag of the source Version string // APIVersion is from api/version.txt APIVersion string // GoVersion is the current version of the go compiler GoVersion string ) func init() { if GitCommit == "" { GitCommit = "" } if BuildTime == "" { BuildTime = "" } if GoOsArch == "" { GoOsArch = "" } if Version == "" { Version = "" } if APIVersion == "" { APIVersion = "" } if GoVersion == "" { GoVersion = runtime.Version() } }