Commits

Byron Clark committed 5053d3b

Generate a changelog when building a release.

closes #10

  • Participants
  • Parent commits 4b05789
  • Tags udiskie-0.3.8

Comments (0)

Files changed (1)

File util/prepare_release

+#!/bin/bash
+
+# Build a release tarball from source.
+# Usage:
+#   util/prepare_release -r <revision>
+# Resulting tarball will reside in dist/
+
+PYTHON=${PYTHON:-python}
+
+[ -d dist ] || mkdir dist
+TMPDEST=$(mktemp -d --tmpdir udiskie-release-XXXXXXXX)
+
+hg archive -t files "$@" "${TMPDEST}"
+hg log --style=changelog "$@" > "${TMPDEST}/CHANGES"
+
+pushd "${TMPDEST}"
+VERSION=$(${PYTHON} setup.py --version)
+${PYTHON} setup.py sdist
+popd
+
+cp "${TMPDEST}/dist/udiskie-${VERSION}.tar.gz" dist/