[dd-ctl] Force DD_DEFAULT_BUILD length to 8 hex digits

This is used to tag Docker images in the registry / pull images form
the registry, it has been observed in the wiled that:

    git rev-parse --short

can have different default values for its length depending on the
system.

We currently specify the length to be 8 as specified here:
https://git-scm.com/docs/git-rev-parse#Documentation/git-rev-parse.txt---shortlength
merge-requests/62/head
Evilham 2023-01-03 10:18:54 +01:00
parent 3cfa0630d6
commit ea995c0336
No known key found for this signature in database
GPG Key ID: AE3EE30D970886BF
1 changed files with 1 additions and 1 deletions

2
dd-ctl
View File

@ -175,7 +175,7 @@ ddupdate(){
}
build_compose(){
DD_DEFAULT_BUILD="$(git rev-parse --short HEAD)"
DD_DEFAULT_BUILD="$(git rev-parse --short=8 HEAD)"
export DD_BUILD="${DD_BUILD:-${DD_DEFAULT_BUILD}}"
setconf DD_BUILD "${DD_BUILD}" .env