1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- // SPDX-FileCopyrightText: 2021 Staffan Olsson <naffatso@gmail.com>
- //
- // 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 = "<not set>"
- }
- if BuildTime == "" {
- BuildTime = "<not set>"
- }
- if GoOsArch == "" {
- GoOsArch = "<not set>"
- }
- if Version == "" {
- Version = "<not set>"
- }
- if APIVersion == "" {
- APIVersion = "<not set>"
- }
- if GoVersion == "" {
- GoVersion = runtime.Version()
- }
- }
|