Fix reporting of version in prebuilt binaries & docker image

This commit is contained in:
Quentin Gliech
2025-01-27 10:34:21 +01:00
parent 057256305c
commit 3b744c7881
4 changed files with 60 additions and 3 deletions

View File

@@ -1,3 +1,8 @@
// This is used to set the version reported by the binary through an environment
// variable. This is mainly useful when building out of a git context, like in
// CI, where we don't have the full commit history available
variable "VERGEN_GIT_DESCRIBE" {}
// This is what is baked by GitHub Actions
group "default" { targets = ["regular", "debug", "syn2mas"] }
@@ -11,8 +16,11 @@ target "docker-metadata-action-syn2mas" {}
target "base" {
args = {
// This is set so that when we use a git context, the .git directory is
// present, as we infer the version at build time out of it
// present, as we may be infering the version at build time out of it
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
// Pass down the version from an external git describe source
VERGEN_GIT_DESCRIBE = "${VERGEN_GIT_DESCRIBE}"
}
platforms = [