Skip to content
Snippets Groups Projects
Commit 1d391003 authored by Maksim Kaitmazian's avatar Maksim Kaitmazian
Browse files

fix: docker build

parent bdfaa37a
No related branches found
No related tags found
1 merge request!1366fix: docker build
Pipeline #53835 failed
use git_version::git_describe;
use git_version::git_version;
use std::collections::HashMap;
use std::collections::HashSet;
use std::io::Write;
......@@ -54,12 +54,13 @@ fn main() {
println!("[{}:{}] {var}={value}", file!(), line!());
}
// GIT_DESCRIBE defines picodata version.
if std::env::var("GIT_DESCRIBE").is_ok() {
// It's docker build, there is no .git folder, but the version was passed via env.
} else {
println!("cargo:rustc-env=GIT_DESCRIBE={}", git_describe!());
}
println!(
"cargo:rustc-env=GIT_DESCRIBE={}",
git_version!(
fallback = std::env::var("GIT_DESCRIBE")
.expect("Failed to get version from git and GIT_DESCRIBE env")
)
);
// This variable controls the type of the build for whole project.
// By default static linking is used (see tarantool-sys/static-build)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment