6 # Determine project name based on current directory
7 PROJECT=$(basename $PWD)
9 # NOTE: Don't like this? Then uncomment one of the following as appropriate
11 # Just set it explictly to whatever you like:
14 # Parse it from any Qt *.pro or *.pri files in CWD:
15 # PROJECT=$(grep -E "TARGET ?= ?" *.pr[io]|cut -d' ' -f3)
21 ?) printf >&2 "Usage: $0 [-h] [-t TAG]\n"
26 # Grab most recent tag from git unless TAG is set
27 if [ -z "$TAG" ] ; then
28 TAG=$(git describe --tags --abbrev=0)
31 # Parse out just the version number
36 # Set name of toplevel directory for the archive
37 PREFIX="${PROJECT}-${VERSION}/"
39 # Set name of resulting release archive file
40 ARCHIVE=${PROJECT}-${VERSION}.tar.bz2
42 [ -e ${ARCHIVE} ] && rm -rf ${ARCHIVE} && echo "Removed: ${ARCHIVE}"
44 if [ ! -z "$head" ] ; then
48 git archive --format=tar --prefix=${PREFIX} $TAG | bzip2 -c -- > ${ARCHIVE} && {
49 echo "Created: ${ARCHIVE}"
51 echo "Creation of release archive ${ARCHIVE} failed. Reason unknown."