Commit 6224cfd7 authored by Frédéric Bonnard's avatar Frédéric Bonnard

New upstream version 1.0.13

parent 62cdd3a1
This diff is collapsed.
#!/bin/bash
#
# Generate markdown ChangeLog files based on git history.
tmp=$(mktemp)
touch ${tmp}
# Commits prior to this one contain mangled commit history.
# Reformatting these requires some extra handholding
LASTCOMMIT="2d48e88ad67f600376926f073302b2617e49675c"
prev_tag="$LASTCOMMIT"
echo "# ChangeLog"
for tag in $(git tag -l [0-9]*.*[0-9] | sort -V); do
# Prepend tags to the output because we want the ChangeLog in the
# reverse order, e.g. 2.0.0, 1.0.1 and 1.0.0.
{
date=$(git show --date=short --format='tformat:%cd' -s ${tag} | tail -n 1)
echo -e "\n## ${tag} - ${date}\n"
git --no-pager log --no-merges --format='format: - %s%n' \
${prev_tag:+${prev_tag}..}${tag} | cat - ${tmp}
} > ${tmp}.1
mv ${tmp}.1 ${tmp}
prev_tag=${tag}
done
# Send the output to stdout.
cat ${tmp}
# Append a revised changelog for stuff prior to LASTCOMMIT in
# consistent style with the generated comments
cat ChangeLog.old.md
rm ${tmp}
#!/bin/bash
logfile=${PWD}/release.$(date +%y-%m-%d-%T).log
# This script attempts to generate a release like tarball
# of the project in the absense of full autotooling support
#
# Since the autotooling support is missing for now
# we'll create an archive with git-archive.
if [ ! -d .git ]; then
echo "Fatal: Not a git project. Bailing"
exit 1
fi
# Determine the library name and version.
PROJVER=libdfp-$(git describe --tags)
# Generate the archive.
if ! git archive --format=tar --prefix=${PROJVER}/ HEAD > ${PROJVER}.tar ; then
echo "Failed to archive"
exit 1
fi
# Generate a changelog and append it.
mkdir ${PROJVER}
./generate-changelog.sh > ${PROJVER}/ChangeLog.md
tar rf ${PROJVER}.tar ${PROJVER}/ChangeLog.md
# Remove any files which needn't exist.
tar f ${PROJVER}.tar \
--delete ${PROJVER}/{make-release.sh,generate-changelog.sh,ChangeLog.old.md}
rm -rf ${PROJVER}
gzip -f ${PROJVER}.tar
tarballs="${PROJVER}.tar.gz"
tar xf ${PROJVER}.tar.gz --warning=no-timestamp
# Attempt a VPATH build.
cd ${PROJVER}
# Update timestamps to prevent odd issues.
touch configure.ac aclocal.m4 configure Makefile.am Makefile.in
mkdir _build
cd _build
echo "Running configure"
if ! ../configure >> ${logfile} 2>&1 ; then
echo "Failed to configure"
exit 1
fi
echo "Running make"
if ! make -j8 >> ${logfile} 2>&1 ; then
echo "Failed to make"
exit 1
fi
echo "Running make check"
if ! make check >> ${logfile} 2>&1 ; then
echo "Failed to check"
fi
cd ../..
rm -rf libdfp
echo "Found tarballs: $tarballs"
# Generate some popular checksums for the tarball.
for tarball in ${tarballs}; do
for sum in sha256 md5; do
echo "Generating ${tarball}.${sum}"
${sum}sum ${tarball} > ${tarball}.${sum}
done
done
# TODO: Support signing these releases
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment