From b773a3a02f35b5d15e6b8f9d2163439e1258d2d4 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 26 May 2009 16:18:41 +0000 Subject: * We have strand flavours. * The version string is now reported as "OpenSim 0.6.5 (Dev)" * This has to be administrated manually. --- OpenSim/Framework/Servers/Tests/VersionInfoTests.cs | 6 ++++-- OpenSim/Framework/Servers/VersionInfo.cs | 15 +++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs b/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs index 1a3d98c..0c5832d 100644 --- a/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs +++ b/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs @@ -17,8 +17,10 @@ namespace OpenSim.Framework.Servers.Tests [Test] public void TestGetVersionStringLength() { - Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.GetVersionString("0.0.0").Length, "0.0.0 failed"); - Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.GetVersionString("9.99.99").Length, "9.99.99 failed"); + foreach (VersionInfo.Flavour flavour in Enum.GetValues(typeof(VersionInfo.Flavour))) + { + Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.GetVersionString("0.0.0", flavour).Length, "0.0.0/" + flavour + " failed"); + } } } } diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index 56f9148..cdf6909 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs @@ -29,24 +29,27 @@ namespace OpenSim { public class VersionInfo { - private enum Flavour + private const string VERSION_NUMBER = "0.6.5"; + private const Flavour VERSION_FLAVOUR = Flavour.Dev; + + public enum Flavour { Unknown, Dev, RC1, RC2, - Release + Release, + Post_Fixes } - private const string m_versionNumber = "0.6.5"; public static string Version { - get { return GetVersionString(m_versionNumber); } + get { return GetVersionString(VERSION_NUMBER, VERSION_FLAVOUR); } } - public static string GetVersionString(string versionNumber) + public static string GetVersionString(string versionNumber, Flavour flavour) { - string versionString = "OpenSimulator Server" + versionNumber; + string versionString = "OpenSim " + versionNumber + " (" + flavour + ")"; return versionString.PadRight(VERSIONINFO_VERSION_LENGTH); } -- cgit v1.1