-#!/bin/bash
-
-# Determine project name based on current directory
-#PROJECT=$(basename $PWD)
-PROJECT="tizen-handset-dialer"
-
-# NOTE: Don't like this? Then uncomment one of the following as appropriate
-#
-# Just set it explictly to whatever you like:
-# PROJECT=libseaside
-#
-# Parse it from any Qt *.pro or *.pri files in CWD:
-# PROJECT=$(grep -E "TARGET ?= ?" *.pr[io]|cut -d' ' -f3)
-
-# Grab most recent tag from git
-TAG=$(git describe --tags --abbrev=0)
-
-# If arg1 is provided, use it as commit/tag/tree-ish id to start
-# the archive creation from...
-[ "${1}z" != "z" ] && {
- TAG=${1}
- echo "Creating release starting from: ${TAG}"
-}
-
-VERSION=$(git describe --tags ${1})
-VERSION=${VERSION//version-/}
-VERSION=${VERSION//-g/+}
-VERSION=${VERSION//-/+git}
-
-# Set name of toplevel directory for the archive
-BASE_PREFIX="${PROJECT}-${VERSION}/"
-BRANDING_PREFIX="${PROJECT}-branding-tizen-${VERSION}/"
-
-# Set name of resulting release archive file
-BASE_ARCHIVE=${PROJECT}-${VERSION}.tar.bz2
-BRANDING_ARCHIVE=${PROJECT}-branding-tizen-${VERSION}.tar.bz2
-
-# Clean up any existing base package for this version
-[ -e ${BASE_ARCHIVE} ] && rm -rf ${BASE_ARCHIVE} &&
- echo "Removed: ${BASE_ARCHIVE}"
-
-# Generate the base package release tar ball
-# NOTE: Becuase I used a git attribute that ignores the tizen theme dir
-# this archive will not include it... that's intentional!
-git archive --prefix=${BASE_PREFIX} ${TAG} | bzip2 -c -- > ${BASE_ARCHIVE} && {
- echo "Created: ${BASE_ARCHIVE}"
-} || {
- echo "Creation of release archive ${BASE_ARCHIVE} failed. Reason unknown."
-}
-
-# Clean up any existing branding package for this version
-[ -e ${BRANDING_ARCHIVE} ] && rm -rf ${BRANDING_ARCHIVE} &&
- echo "Removed: ${BRANDING_ARCHIVE}"
-# Generate the branding package release tar ball
-pushd themes > /dev/null
-git archive --prefix=${BRANDING_PREFIX} ${TAG} tizen/ themes.pro | bzip2 -c -- > ../${BRANDING_ARCHIVE} && {
- echo "Created: ${BRANDING_ARCHIVE}"
-} || {
- echo "Creation of release archive ${BRANDING_ARCHIVE} failed. Reason unknown."
-}
-popd > /dev/null