#!/usr/bin/sh
#
# Copyright (c) 2006 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# Author: Greg Nichols
#
# determine the next available package tag for test package
CURRENT_TAG=`rhts-mk-get-current-tag`

# Note: the current version according to the CVS tag can be had via:
# CURRENT_TAG_VERSION=`rhts-mk-get-version-info -v $CURRENT_TAG`

# Get the current version specified in Makefile, default to 1.0 :
CURRENT_VERSION=$(echo $TESTVERSION | sed -e 's/\./_/g')
if [ -z "$CURRENT_VERSION" ]; then
	CURRENT_VERSION="1_0"
fi

CURRENT_RELEASE=`rhts-mk-get-version-info -r $CURRENT_TAG`
let "NEXT_RELEASE = CURRENT_RELEASE + 1"
PACKAGE_NAME=`rhts-mk-get-test-package-name`
echo $PACKAGE_NAME-$CURRENT_VERSION-$NEXT_RELEASE
