blob: 0e988e2bc91ec7dbb366eabcb9fbebac86a08952 [file]
load("@io_bazel_rules_go//go:def.bzl", "go_library")
# Under --stamp, the Go linker will fill in these placeholders with VCS info
# see https://github.com/bazelbuild/rules_go/blob/master/go/core.rst#stamping-with-the-workspace-status-script
_GO_STAMP_X_DEFS = {
"BuildTime": "{BUILD_TIME}",
"GitCommit": "{STABLE_BUILD_SCM_SHA}",
"GitStatus": "{STABLE_BUILD_SCM_LOCAL_CHANGES}",
"HostName": "{BUILD_HOST}",
"Release": "{STABLE_BUILD_SCM_TAG}",
}
go_library(
name = "buildinfo",
srcs = ["buildinfo.go"],
importpath = "aspect.build/cli/buildinfo",
visibility = ["//visibility:public"],
x_defs = _GO_STAMP_X_DEFS,
)