release.sh and release notes changes post-release (#4258)

This commit is contained in:
Michael Stapelberg 2020-11-15 19:22:09 +01:00 committed by GitHub
parent a901498758
commit 4b1ea08eef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 27 deletions

21
RELEASE-NOTES-next Normal file
View File

@ -0,0 +1,21 @@
┌──────────────────────────────┐
│ Release notes for i3 v4.20 │
└──────────────────────────────┘
This is i3 v4.19. This version is considered stable. All users of i3 are
strongly encouraged to upgrade.
┌────────────────────────────┐
│ Changes in i3 v4.20 │
└────────────────────────────┘
• placeholder
┌────────────────────────────┐
│ Bugfixes │
└────────────────────────────┘
• placeholder

View File

@ -1,8 +1,10 @@
#!/bin/zsh
# This script is used to prepare a new release of i3.
set -eu
export RELEASE_VERSION="4.19"
export PREVIOUS_VERSION="4.18"
export PREVIOUS_VERSION="4.18.3"
export RELEASE_BRANCH="next"
if [ ! -e "../i3.github.io" ]
@ -24,12 +26,6 @@ then
exit 1
fi
if git diff-files --quiet --exit-code debian/changelog
then
echo "Expected debian/changelog to be changed (containing the changelog for ${RELEASE_VERSION})."
exit 1
fi
eval $(gpg-agent --daemon)
export GPG_AGENT_INFO
@ -52,28 +48,32 @@ if [ ! -e "${STARTDIR}/RELEASE-NOTES-${RELEASE_VERSION}" ]; then
exit 1
fi
git checkout -b release-${RELEASE_VERSION}
git rm RELEASE-NOTES-*
cp "${STARTDIR}/RELEASE-NOTES-${RELEASE_VERSION}" "RELEASE-NOTES-${RELEASE_VERSION}"
git add RELEASE-NOTES-${RELEASE_VERSION}
git rm RELEASE-NOTES-${PREVIOUS_VERSION}
sed -i "s/^\s*version: '${PREVIOUS_VERSION}'/ version: '${RELEASE_VERSION}'/" meson.build
# Update the release version:
sed -i "s/^\s*version: '4.[^']*'/ version: '${RELEASE_VERSION}'/" meson.build
cp meson.build "${TMPDIR}/meson.build"
# Inject the release date into meson.build for the dist tarball:
sed -i "s/'-non-git'/' ($(date +'%Y-%m-%d'))'/" meson.build
git commit -a -m "release i3 ${RELEASE_VERSION}"
git tag "${RELEASE_VERSION}" -m "release i3 ${RELEASE_VERSION}" --sign --local-user=0x4AC8EE1D
mkdir build
(cd build && meson .. && ninja dist)
cp build/meson-build/i3-${RELEASE_VERSION}.tar.xz .
cp build/meson-dist/i3-${RELEASE_VERSION}.tar.xz .
echo "Differences in the release tarball file lists:"
diff --color -u \
<(tar tf ../i3-${PREVIOUS_VERSION}.tar.xz | sed "s,i3-${PREVIOUS_VERSION}/,,g" | sort) \
<(tar tf i3-${RELEASE_VERSION}.tar.xz | sed "s,i3-${RELEASE_VERSION}/,,g" | sort)
<(tar tf ../i3-${PREVIOUS_VERSION}.tar.* | sed "s,i3-${PREVIOUS_VERSION}/,,g" | sort) \
<(tar tf i3-${RELEASE_VERSION}.tar.xz | sed "s,i3-${RELEASE_VERSION}/,,g" | sort) || true
gpg --armor -b i3-${RELEASE_VERSION}.tar.xz
echo "${RELEASE_VERSION}-non-git" > I3_VERSION
git add I3_VERSION
git commit -a -m "Set non-git version to ${RELEASE_VERSION}-non-git."
mv "${TMPDIR}/meson.build" .
git add meson.build
git commit -a -m "Restore non-git version suffix"
if [ "${RELEASE_BRANCH}" = "stable" ]; then
git checkout stable
@ -94,17 +94,12 @@ git config --add remote.origin.push "+refs/heads/next:refs/heads/next"
git config --add remote.origin.push "+refs/heads/stable:refs/heads/stable"
################################################################################
# Section 2: Debian packaging
# Section 2: Debian packaging (for QA)
################################################################################
cd "${TMPDIR}"
mkdir debian
# Copy over the changelog because we expect it to be locally modified in the
# start directory.
cp "${STARTDIR}/debian/changelog" i3/debian/changelog
(cd i3 && git add debian/changelog && git commit -m 'Update debian/changelog')
cat > ${TMPDIR}/Dockerfile <<EOT
FROM debian:sid
RUN sed -i 's,^deb \(.*\),deb \1\ndeb-src \1,g' /etc/apt/sources.list
@ -133,9 +128,6 @@ done
echo "Content of resulting packages .changes file:"
cat ${TMPDIR}/debian/*.changes
# debsign is in devscripts, which is available in fedora and debian
debsign --no-re-sign -k4AC8EE1D ${TMPDIR}/debian/*.changes
# TODO: docker cleanup
################################################################################
@ -176,7 +168,7 @@ sed -i "s,Verify you are using i3 ≥ .*,Verify you are using i3 ≥ ${RELEASE_V
(cd _docs && make)
for i in $(find _docs -maxdepth 1 -and -type f -and \! -regex ".*\.\(html\|man\)$" -and \! -name "Makefile")
for i in $(find _docs -maxdepth 1 -and -type f -and \! -regex ".*\.\(html\|man\|css\)$" -and \! -name "Makefile")
do
base="$(basename $i)"
[ -e "${TMPDIR}/i3/docs/${base}" ] && cp "_docs/${base}.html" docs/
@ -234,6 +226,5 @@ echo " Create milestone for the next major version with unset due date"
echo ""
echo "Announce on:"
echo " twitter"
echo " google+"
echo " #i3 topic"
echo " reddit /r/i3wm"
echo " reddit /r/i3wm (link post to changelog)"