libfuse/make_release_tarball.sh

38 lines
856 B
Bash
Raw Normal View History

2017-09-12 21:46:00 +08:00
#!/bin/sh
#
# Create tarball from Git tag, removing and adding
# some files.
#
set -e
if [ -z "$1" ]; then
2023-07-05 18:03:07 +08:00
TAG="$(git tag --list 'fuse-3*' --sort=-creatordate | head -1)"
2017-09-12 21:46:00 +08:00
else
TAG="$1"
fi
2023-07-05 18:03:07 +08:00
PREV_TAG="$(git tag --list 'fuse-3*' --sort=-creatordate --merged "${TAG}^"| head -1)"
MAJOR_REV=${TAG%.*}
2017-09-12 21:46:00 +08:00
echo "Creating release tarball for ${TAG}..."
git checkout -q "${TAG}"
2017-09-12 21:46:00 +08:00
doxygen doc/Doxyfile
mkdir "${TAG}"
git archive --format=tar "${TAG}" | tar -x "--directory=${TAG}"
find "${TAG}" -name .gitignore -delete
rm -r "${TAG}/make_release_tarball.sh" \
"${TAG}/.github" \
"${TAG}/.cirrus.yml"
2017-09-12 21:46:00 +08:00
cp -a doc/html "${TAG}/doc/"
2023-07-05 18:03:07 +08:00
tar -czf "${TAG}.tar.gz" "${TAG}/"
signify-openbsd -S -s signify/$MAJOR_REV.sec -m $TAG.tar.gz
2023-07-05 18:03:07 +08:00
echo "Contributors from ${PREV_TAG} to ${TAG}:"
git log --pretty="format:%an <%aE>" "${PREV_TAG}..${TAG}" | sort -u