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.

62 lines
1.7 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 mumble module version'
  26. fi
  27. VERSIONSTR=`python -c 'import mumble; print mumble.version_str'`
  28. SETUPVER=`grep 'version=' setup_mucli.py | cut '-d"' -f2`
  29. if [ "v${SETUPVER}" != "${VERSIONSTR}" ]; then
  30. echo "Warning: Version string in setup_mucli.py has not been updated."
  31. echo " Running vi so you can fix it in three, two, one."
  32. sleep 3
  33. MODFILE="${PYWEB}/setup_mucli.py"
  34. vi "$MODFILE" -c '/version='
  35. hg commit "$MODFILE" -m 'Bump version in setup_mucli.py'
  36. fi
  37. HISTFILE=`tempfile`
  38. hg log -r "${LASTTAG}:tip" > "${HISTFILE}"
  39. vi -p "${HISTFILE}" "${BASEDIR}/CHANGELOG"
  40. rm "${HISTFILE}"
  41. echo "New version will be tagged ${VERSIONSTR}. If this is correct, hit enter to continue."
  42. read
  43. hg commit "${BASEDIR}/CHANGELOG" -m "Releasing ${VERSIONSTR}."
  44. hg tag "${VERSIONSTR}"
  45. hg push
  46. echo "You successfully released ${VERSIONSTR}!"