2011-11-18 14:45:59 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Nico Schottelius
|
2011-04-19 20:40:51 +00:00
|
|
|
|
2011-11-18 14:45:59 +00:00
|
|
|
files="doc/changelog lib/cdist/__init__.py"
|
2011-04-19 20:34:47 +00:00
|
|
|
|
2011-04-19 20:34:13 +00:00
|
|
|
# Stuff to take care of when doing a release
|
2011-04-19 20:34:47 +00:00
|
|
|
echo "Preparing next release"
|
2011-04-19 20:34:13 +00:00
|
|
|
|
2011-04-19 20:40:51 +00:00
|
|
|
# Ensure documentation builds cleanly
|
2011-11-18 14:45:59 +00:00
|
|
|
echo "Testing documentation..."
|
|
|
|
./build clean && ./build man || exit 1
|
|
|
|
|
2011-04-19 20:40:51 +00:00
|
|
|
# get version
|
2011-11-18 14:45:59 +00:00
|
|
|
changelog_version=$(head -n1 doc/changelog | sed 's/:.*//')
|
2011-11-18 14:58:26 +00:00
|
|
|
#git_version=$(git describe)
|
|
|
|
lib_version=$(grep ^VERSION lib/cdist/__init__.py | sed -e 's/.*= //' -e 's/"//g')
|
|
|
|
|
|
|
|
echo "Ensure you fixed/prepared version files: $files"
|
|
|
|
echo "changelog: $changelog_version"
|
|
|
|
#echo "git: $git_version"
|
|
|
|
echo "lib: $lib_version"
|
2011-11-18 14:45:59 +00:00
|
|
|
|
2011-11-18 14:59:36 +00:00
|
|
|
if [ "$lib_version" != "$changelog_version" ]; then
|
2011-11-18 14:45:59 +00:00
|
|
|
echo "Messed up versions, not releasing"
|
|
|
|
exit 1
|
2011-11-18 15:04:19 +00:00
|
|
|
else
|
2011-11-18 15:11:51 +00:00
|
|
|
echo "Versions are sane, continuing"
|
2011-11-18 14:45:59 +00:00
|
|
|
fi
|
2011-11-18 14:59:36 +00:00
|
|
|
echo "Press enter to continue"
|
|
|
|
read wait
|
2011-11-18 14:58:26 +00:00
|
|
|
version=$lib_version
|
2011-04-19 20:40:51 +00:00
|
|
|
|
|
|
|
# get target branch
|
|
|
|
branch=${version%.?}
|
2011-04-19 20:34:13 +00:00
|
|
|
|
2011-04-19 20:43:49 +00:00
|
|
|
# add tag
|
2011-11-18 15:04:19 +00:00
|
|
|
printf "Enter tag description for %s> " "$version"
|
2011-04-19 20:43:49 +00:00
|
|
|
read tagmessage
|
2011-05-10 13:51:08 +00:00
|
|
|
git tag "$version" -m "$tagmessage"
|
2011-04-19 20:43:49 +00:00
|
|
|
|
2011-04-19 20:34:13 +00:00
|
|
|
# Import into current version branch
|
2012-01-18 07:34:15 +00:00
|
|
|
printf "Press enter to git merge into $branch > "
|
|
|
|
read prompt
|
2011-04-19 20:40:51 +00:00
|
|
|
git checkout $branch
|
2011-04-19 20:34:13 +00:00
|
|
|
git merge master
|
2011-04-19 20:48:28 +00:00
|
|
|
git checkout master
|
2011-04-19 20:34:13 +00:00
|
|
|
|
2011-04-19 20:40:51 +00:00
|
|
|
# Publish manpages and sourcecode
|
2012-01-18 07:34:15 +00:00
|
|
|
printf "Press enter to publish doc/ and code/ > "
|
|
|
|
read prompt
|
2011-11-18 14:45:59 +00:00
|
|
|
./build web
|
|
|
|
./build pub
|
2012-01-18 07:34:15 +00:00
|
|
|
|
|
|
|
cat << notes
|
|
|
|
To be done manually...
|
|
|
|
|
|
|
|
- freecode release
|
|
|
|
- blog entry
|
2012-01-18 07:36:26 +00:00
|
|
|
- linkedin entry
|
2012-01-18 07:34:15 +00:00
|
|
|
- mailinglist update
|
|
|
|
|
|
|
|
notes
|