#/bin/sh
#
#  Copyright (C) 2004-2008 Freeciv team

# Version definition for Freeciv.

MAJOR_VERSION="2"
MINOR_VERSION="5"
PATCH_VERSION="3"
VERSION_LABEL=""

# 1) Development until MAJOR and MINOR version numbers are
#    set to new release series:
#   - IS_DEVEL_VERSION=1
#   - IS_FREEZE_VERSION=0
#   - IS_BETA_VERSION=0
#
# 2) Development from version number bump to first beta:
#   - IS_DEVEL_VERSION=1
#   - IS_FREEZE_VERSION=1
#   - IS_BETA_VERSION=0
#
# 3) Development from first beta to first RC:
#   - IS_DEVEL_VERSION=0
#   - IS_FREEZE_VERSION=0
#   - IS_BETA_VERSION=1
#
# 4) Stable, starting from first RC:
#   - IS_DEVEL_VERSION=0
#   - IS_FREEZE_VERSION=0
#   - IS_BETA_VERSION=0
# (and update DEFAULT_FOLLOW_TAG to "stable", and also
# win32/installer/Makefile --follow-tag to "win32")

IS_DEVEL_VERSION=0
IS_FREEZE_VERSION=0
IS_BETA_VERSION=0

NEXT_STABLE_VERSION="2.5.0"

# 0 to disable display of release month until we can make better estimate
RELEASE_MONTH=3

DATASUBDIR=2.5
DEFAULT_FOLLOW_TAG=stable

# Freeciv network capstring: see documentation in common/capstr.c
#
# +Freeciv.Devel.YYYY.MMM.DD is the base capability string.
#
#   - No new mandatory capabilities can be added to the release branch; doing
#     so would break network capability of supposedly "compatible" releases.
#
#   - Avoid adding a new mandatory capability to the development branch for
#     as long as possible.  We want to maintain network compatibility with
#     the stable branch for as long as possible.
NETWORK_CAPSTRING_MANDATORY="+Freeciv-2.5-network"
NETWORK_CAPSTRING_OPTIONAL="nationset_change tech_cost split_reports extended_move_rate"

FREECIV_DISTRIBUTOR=""

if test x$VERSION_REVTYPE = xsvn && which svn > /dev/null ; then
  VERSION_REV="r$(LANG=C svn info 2>/dev/null | grep "^Revision: " | sed 's/^Revision: //')"
elif test x$VERSION_REVTYPE = xgit && which git > /dev/null ; then
  VERSION_REV="$(git rev-parse HEAD)"
else
  VERSION_REV=""
fi
if test "x$VERSION_REV" != "x" && test "x$VERSION_LABEL" != "x+" ; then
  VERSION_REV="+${VERSION_REV}"
fi

if test x$VERSION_SCRIPT_SILENT != xyes ; then
  VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${VERSION_LABEL}${VERSION_REV}
  echo ${VERSION}
fi
