Forked mumble-django project from https://bitbucket.org/Svedrin/mumble-django
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.3 KiB

  1. #!/bin/bash
  2. # Create a new release of Mumble-Django.
  3. set -e
  4. set -u
  5. export HGPLAIN=t
  6. BASEDIR=`hg root`
  7. PYWEB="${BASEDIR}/pyweb"
  8. LASTTAG=`hg tags | grep -v tip | head -n1 | cut -d' ' -f1`
  9. cd "${PYWEB}"
  10. echo "Updating djExtDirect."
  11. wget -nv -N 'http://bitbucket.org/Svedrin/djextdirect/raw/tip/djextdirect.py'
  12. if hg status djextdirect.py | grep djextdirect.py > /dev/null; then
  13. # looks like wget changed the file
  14. hg commit djextdirect.py -m "Update djExtDirect"
  15. fi
  16. VERSIONSTR=`python -c 'import mumble; print mumble.version_str'`
  17. echo
  18. echo "Current version is ${VERSIONSTR}."
  19. if hg tags | grep "${VERSIONSTR}" > /dev/null; then
  20. echo "Warning: Version string in Mumble module has not been updated."
  21. echo " Running vi so you can fix it in three, two, one."
  22. sleep 3
  23. MODFILE="${PYWEB}/mumble/__init__.py"
  24. vi "$MODFILE" -c '/version ='
  25. hg commit "$MODFILE" -m 'Bump version'
  26. fi
  27. HISTFILE=`tempfile`
  28. hg log -r "${LASTTAG}:tip" > "${HISTFILE}"
  29. vi -p "${HISTFILE}" "${BASEDIR}/CHANGELOG"
  30. rm "${HISTFILE}"
  31. VERSIONSTR=`python -c 'import mumble; print mumble.version_str'`
  32. echo "New version will be tagged ${VERSIONSTR}. If this is correct, hit enter to continue."
  33. read
  34. echo hg commit "${BASEDIR}/CHANGELOG" -m "Releasing ${VERSIONSTR}."
  35. echo hg tag "${VERSIONSTR}"
  36. echo hg push
  37. echo "You successfully released ${VERSIONSTR}!"