dmaketgz: only run 'make distclean' if Makefile exists

... so that we can avoid the build failure if we run this in a clean
checkout.

Also remove -it from the docker invoke since it is not interactive and
it needs no TTY. They made the job fail in the CI.
This commit is contained in:
Daniel Stenberg 2024-08-02 09:16:31 +02:00
parent 4d34fd26db
commit d0afb33959
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -30,20 +30,22 @@ set -eu
version="${1:-}"
if [ -z "$version" ]; then
echo "Specify a version number!"
exit
echo "Specify a version number!"
exit
fi
timestamp="${2:-$(date -u +%s)}"
make distclean
if test -f Makefile; then
make distclean
fi
docker build \
--build-arg SOURCE_DATE_EPOCH="$timestamp" \
--build-arg UID="$(id -u)" \
--build-arg GID="$(id -g)" \
-t curl/curl .
docker run --rm -it -u "$(id -u):$(id -g)" \
docker run --rm -u "$(id -u):$(id -g)" \
-v "$(pwd):/usr/src" -w /usr/src curl/curl sh -c "
set -e
autoreconf -fi