Skip to content

Commit 8789b92

Browse files
committed
Fix Git version assumption
1 parent f045e71 commit 8789b92

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Dockerfile.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM alpine:3.12
33
{{ if env.version == "devel" then ( -}}
44
# https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel
55
ENV _BASH_COMMIT {{ .commit.version }}
6+
# {{ .commit.description }}
67
ENV _BASH_VERSION devel-{{ .version }}
78
{{ ) else ( -}}
89
# https://ftp.gnu.org/gnu/bash/?C=M;O=D

versions.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,17 @@ for version in "${versions[@]}"; do
4848
if timestamp="$(sed -rne '/.*[[:space:]]+bash-([0-9]+)[[:space:]]+.*/s//\1/p' <<<"$desc")" && [ -n "$timestamp" ]; then
4949
: # "commit bash-20210305 snapshot"
5050
else
51-
timestamp="$(git -C "$tmp/devel" log --max-count=1 --format='format:%as' "$commit")"
51+
timestamp="$(git -C "$tmp/devel" log --max-count=1 --format='format:%aI' "$commit")" # ideally we'd use "%as" and just axe "-" but that requires newer Git than Debian 10 has /o\
52+
timestamp="${timestamp%%T*}"
5253
timestamp="${timestamp//-/}"
5354
fi
5455

5556
echo "$version: $commit ($timestamp -- $desc)"
5657

57-
export commit timestamp
58+
export commit timestamp desc
5859
json="$(jq <<<"$json" -c '.[env.version] = {
5960
version: env.timestamp,
60-
commit: { version: env.commit },
61+
commit: { version: env.commit, description: env.desc },
6162
}')"
6263
continue
6364
fi

0 commit comments

Comments
 (0)