Browse Source

add release creator script. (just a backup for me, you can't use it w/o repo writer permissions :)

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
adca41be99
  1. 52
      .release.sh

52
.release.sh

@ -0,0 +1,52 @@
#!/bin/bash
# Create a new release of Mumble-Django.
set -e
set -u
export HGPLAIN=t
BASEDIR=`hg root`
PYWEB="${BASEDIR}/pyweb"
LASTTAG=`hg tags | grep -v tip | head -n1 | cut -d' ' -f1`
cd "${PYWEB}"
echo "Updating djExtDirect."
wget -nv -N 'http://bitbucket.org/Svedrin/djextdirect/raw/tip/djextdirect.py'
if hg status djextdirect.py | grep djextdirect.py > /dev/null; then
# looks like wget changed the file
hg commit djextdirect.py -m "Update djExtDirect"
fi
VERSIONSTR=`python -c 'import mumble; print mumble.version_str'`
echo
echo "Current version is ${VERSIONSTR}."
if hg tags | grep "${VERSIONSTR}" > /dev/null; then
echo "Warning: Version string in Mumble module has not been updated."
echo " Running vi so you can fix it in three, two, one."
sleep 3
MODFILE="${PYWEB}/mumble/__init__.py"
vi "$MODFILE" -c '/version ='
hg commit "$MODFILE" -m 'Bump version'
fi
HISTFILE=`tempfile`
hg log -r "${LASTTAG}:tip" > "${HISTFILE}"
vi -p "${HISTFILE}" "${BASEDIR}/CHANGELOG"
rm "${HISTFILE}"
VERSIONSTR=`python -c 'import mumble; print mumble.version_str'`
echo "New version will be tagged ${VERSIONSTR}. If this is correct, hit enter to continue."
read
echo hg commit "${BASEDIR}/CHANGELOG" -m "Releasing ${VERSIONSTR}."
echo hg tag "${VERSIONSTR}"
echo hg push
echo "You successfully released ${VERSIONSTR}!"
Loading…
Cancel
Save