Skip to content

Commit 0a94578

Browse files
committed
maketgz: accept option to include latest commit hash
If the second argument to the script is "commit", then this will generate a file named `docs/tarball-commit.txt` that contains the latest commit hash (git rev-parse HEAD) at the time the script runs. Doing this breaks the reproducibility so it will not be used for "real" releases but is meant for automated daily snapshots and similar. Reported-by: Dan Fandrich Fixes #14363 Closes #14369
1 parent 9a0cf56 commit 0a94578

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

maketgz

+15-3
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,24 @@ export LC_ALL=C
3232
export TZ=UTC
3333

3434
version="${1:-}"
35+
cmd="${2:-}"
3536

3637
if [ -z "$version" ]; then
3738
echo "Specify a version number!"
3839
exit
3940
fi
4041

41-
if [ "only" = "${2:-}" ]; then
42+
echo "$cmd"
43+
44+
only=""
45+
if [ "only" = "$cmd" ]; then
4246
echo "Setup version number only!"
4347
only=1
44-
else
45-
only=
48+
fi
49+
50+
commit=""
51+
if [ "commit" = "$cmd" ]; then
52+
commit=1
4653
fi
4754

4855
libversion="$version"
@@ -152,6 +159,11 @@ fi
152159
echo "produce RELEASE-TOOLS.md"
153160
./scripts/release-tools.sh "$timestamp" "$version" > docs/RELEASE-TOOLS.md.dist
154161

162+
if test -n "$commit"; then
163+
echo "produce docs/tarball-commit.txt"
164+
git rev-parse HEAD >docs/tarball-commit.txt.dist
165+
fi
166+
155167
############################################################################
156168
#
157169
# Now run make dist to generate a tar.gz archive

0 commit comments

Comments
 (0)