## option defaults
OPT_BRANCH=""
OPT_DOCSDIR=""
-OPT_TAG=""
OPT_KEYID=""
TOPDIR="`dirname $0`/.."
echo " --help Print command usage"
echo " --branch <name> Specify the branch to to create the archive file from"
echo " --copy-docs <dir> Copy documentation from <dir> rather than building"
- echo " --tag <name> Tag name for release"
echo " --keyid <email> The GnuPG key ID used to sign the release tag"
echo ""
}
OPT_DOCSDIR="$1"
shift
;;
- --tag)
- shift
- if [ -z "$1" ]; then
- printUsage
- return 1
- fi
- OPT_TAG="$1"
- shift
- ;;
--keyid)
shift
if [ -z "$1" ]; then
##
function createReleaseTag
{
- if [ -z "${OPT_TAG}" ]; then
- echo "Tagging disabled"
- return 0
- fi
+ tagname="$1"
- if [ "x`git tag -l ${OPT_TAG}`" != "x" ]; then
- echo -n "Tag exists. Do you wish to overwrite? (y/N): "
+ if [ "x`git tag -l ${tagname}`" != "x" ]; then
+ echo -n "Tag '${tagname}' exists. Do you wish to overwrite? (y/N): "
read answer
if [ "x$answer" != "xy" ]; then
fi
fi
- git tag -u ${OPT_KEYID} ${OPT_TAG}
- exitOnError $? "Failed to create tag"
+ git tag -u ${OPT_KEYID} ${tagname}
+ exitOnError $? "Failed to create tag '${tagname}'"
return 0
}
popd
- createReleaseTag
+ createReleaseTag "samba-${version}"
exitOnError $? "Failed to create release tag"
return 0