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