cdist/doc/dev/releasechecklist
Nico Schottelius 32fa32bd52 improve release script
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2011-11-18 15:45:59 +01:00

42 lines
992 B
Bash
Executable file

#!/bin/sh
# Nico Schottelius
files="doc/changelog lib/cdist/__init__.py"
# Stuff to take care of when doing a release
echo "Preparing next release"
# Ensure documentation builds cleanly
echo "Testing documentation..."
./build clean && ./build man || exit 1
echo "Ensure you fixed/prepared version files: $files"
read wait
# get version
lib_version=$(grep ^VERSION lib/cdist/__init__.py | sed -e 's/.*= //' -e 's/"//g')
changelog_version=$(head -n1 doc/changelog | sed 's/:.*//')
git_version=$(git describe)
if [ "$lib_version" != "$changelog_version -o "$changelog_version" != "$git_version" ]; then
echo "Messed up versions, not releasing"
exit 1
fi
version=$git_version
# get target branch
branch=${version%.?}
# add tag
printf "Enter description for %s>" "$version"
read tagmessage
git tag "$version" -m "$tagmessage"
# Import into current version branch
git checkout $branch
git merge master
git checkout master
# Publish manpages and sourcecode
./build web
./build pub