1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
#!/bin/sh
## Copyright (C) 2006-2011 Daniel Baumann <daniel.baumann@progress-technologies.net>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
set -e
_MODE="$(basename ${0} | awk -F- '{ print $2 }')"
if [ -n "${1}" ]
then
_VERSION="${1}"
else
_VERSION="$(dpkg-parsechangelog | awk '/^Version: / { print $2 }' | cut -d: -f 2-)"
fi
_TAG="$(echo ${_VERSION} | sed -e 's|~|_|g')"
_HASH="${2}"
if [ ! -d .git ]
then
if ls .git* > /dev/null 2>&1
then
echo "W: '$(basename ${PWD})' - Not a Git repository but contains Git meta data."
fi
git init --shared
fi
git add .
chmod 0755 debian/rules
git commit -a -m "Adding ${_MODE} version ${_VERSION}."
git-${_MODE}-tag ${_TAG} ${_HASH}
|