automake --include-deps Makefile >/dev/null
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
+echo "produce RELEASE-TOOLS.md"
+./scripts/release-tools.sh "$timestamp" "$version" "$commit" > docs/RELEASE-TOOLS.md.dist
+
############################################################################
#
# Now run make dist to generate a tar.gz archive
timestamp=${1:-unknown}
version=${2:-unknown}
tag=$(echo "curl-$version" | tr '.' '_')
+commit=${3}
+if [ -n "$commit" ] && [ -r "docs/tarball-commit.txt.dist" ]; then
+ # If commit is given, then the tag likely doesn't actually exist
+ tag="$(cat docs/tarball-commit.txt.dist)"
+fi
cat <<MOO
# Release tools used for curl $version
MOO
-exists=$(command -v dpkg 2>/dev/null)
-if test ! -e "$exists"; then
- echo "(unknown, could not find dpkg)"
- exit
+if ! command -v dpkg >/dev/null; then
+ echo "Error: could not find dpkg" >&2
+ exit 1
fi
debian() {
# Reproduce the tarball
-- Clone the repo and checkout the tag: $tag
+- Clone the repo and checkout the tag/commit: $tag
- Install the same set of tools + versions as listed above
## Do a standard build