mirror of
https://github.com/curl/curl.git
synced 2026-07-24 20:27:18 +03:00
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
This commit is contained in:
parent
9a0cf56471
commit
0a94578a9c
1 changed files with 15 additions and 3 deletions
18
maketgz
18
maketgz
|
|
@ -32,17 +32,24 @@ export LC_ALL=C
|
|||
export TZ=UTC
|
||||
|
||||
version="${1:-}"
|
||||
cmd="${2:-}"
|
||||
|
||||
if [ -z "$version" ]; then
|
||||
echo "Specify a version number!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "only" = "${2:-}" ]; then
|
||||
echo "$cmd"
|
||||
|
||||
only=""
|
||||
if [ "only" = "$cmd" ]; then
|
||||
echo "Setup version number only!"
|
||||
only=1
|
||||
else
|
||||
only=
|
||||
fi
|
||||
|
||||
commit=""
|
||||
if [ "commit" = "$cmd" ]; then
|
||||
commit=1
|
||||
fi
|
||||
|
||||
libversion="$version"
|
||||
|
|
@ -152,6 +159,11 @@ fi
|
|||
echo "produce RELEASE-TOOLS.md"
|
||||
./scripts/release-tools.sh "$timestamp" "$version" > docs/RELEASE-TOOLS.md.dist
|
||||
|
||||
if test -n "$commit"; then
|
||||
echo "produce docs/tarball-commit.txt"
|
||||
git rev-parse HEAD >docs/tarball-commit.txt.dist
|
||||
fi
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Now run make dist to generate a tar.gz archive
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue