1537: Import `.git` to the docker build image to fix vergen r=curquiza a=irevoire

I observed a small difference in the size of the build image, but I think we can allow it:
![image](https://user-images.githubusercontent.com/7032172/127369567-d03f9a41-3ad5-4933-888e-a3777df8c6cf.png)

I was not able to see any difference in build time, though.

Co-authored-by: Tamo <tamo@meilisearch.com>
This commit is contained in:
bors[bot] 2021-07-29 12:31:55 +00:00 committed by GitHub
commit 976075578f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -1,5 +1,4 @@
target target
Dockerfile Dockerfile
.dockerignore .dockerignore
.git
.gitignore .gitignore

View File

@ -108,8 +108,8 @@ pub fn print_launch_resume(opt: &Opt, data: &Data) {
Some("") | None => env!("VERGEN_GIT_SHA"), Some("") | None => env!("VERGEN_GIT_SHA"),
Some(commit_sha) => commit_sha, Some(commit_sha) => commit_sha,
}; };
let commit_date = match dbg!(option_env!("COMMIT_DATE")) { let commit_date = match option_env!("COMMIT_DATE") {
Some("") | None => dbg!(env!("VERGEN_GIT_COMMIT_TIMESTAMP")), Some("") | None => env!("VERGEN_GIT_COMMIT_TIMESTAMP"),
Some(commit_date) => commit_date, Some(commit_date) => commit_date,
}; };