Commit e2c4284f authored by Markus Frosch's avatar Markus Frosch 📣

Update release script to avoid dch

parent d600afb0
......@@ -101,20 +101,31 @@ fi
# Doing the actual work now
if [ "$variant" = deb ]; then
echo "Updating version with dch"
DEBFULLNAME="$(git config user.name)"
DEBEMAIL="$(git config user.email)"
echo "Updating version in debian/changelog"
if ! DEBFULLNAME="$(git config user.name)"; then
echo "Could not get your user name from git!" >&2
exit 1
fi
if ! DEBEMAIL="$(git config user.email)"; then
echo "Could not get your user email from git!" >&2
exit 1
fi
export DEBFULLNAME DEBEMAIL
dchopt=()
if [[ "${version}" != *-* ]]; then
full_version="${version}-1"
else
full_version="${version}"
dchopt+=(--force-distribution -D "${DCH_DIST}")
fi
(set -x; dch -v "${full_version}" "${dchopt[@]}" -- "${message}")
source_name="$(grep Source: debian/control | awk '{print $2}')"
changelog="${source_name} (${full_version}) ${DCH_DIST}; urgency=medium"$'\n\n'
changelog+=" * ${message}"$'\n'
changelog+=$'\n'" -- ${DEBFULLNAME} <${DEBEMAIL}> $(LANG=C date -R)"$'\n\n'
# Insert into changelog
echo -n "${changelog}" | cat - debian/changelog >debian/changelog.tmp
mv debian/changelog.tmp debian/changelog
# Staging the change
git add debian/changelog
......
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