aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/Tests/VersionInfoTests.cs6
-rw-r--r--OpenSim/Framework/Servers/VersionInfo.cs15
2 files changed, 13 insertions, 8 deletions
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
17 [Test] 17 [Test]
18 public void TestGetVersionStringLength() 18 public void TestGetVersionStringLength()
19 { 19 {
20 Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.GetVersionString("0.0.0").Length, "0.0.0 failed"); 20 foreach (VersionInfo.Flavour flavour in Enum.GetValues(typeof(VersionInfo.Flavour)))
21 Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.GetVersionString("9.99.99").Length, "9.99.99 failed"); 21 {
22 Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.GetVersionString("0.0.0", flavour).Length, "0.0.0/" + flavour + " failed");
23 }
22 } 24 }
23 } 25 }
24} 26}
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
29{ 29{
30 public class VersionInfo 30 public class VersionInfo
31 { 31 {
32 private enum Flavour 32 private const string VERSION_NUMBER = "0.6.5";
33 private const Flavour VERSION_FLAVOUR = Flavour.Dev;
34
35 public enum Flavour
33 { 36 {
34 Unknown, 37 Unknown,
35 Dev, 38 Dev,
36 RC1, 39 RC1,
37 RC2, 40 RC2,
38 Release 41 Release,
42 Post_Fixes
39 } 43 }
40 private const string m_versionNumber = "0.6.5";
41 44
42 public static string Version 45 public static string Version
43 { 46 {
44 get { return GetVersionString(m_versionNumber); } 47 get { return GetVersionString(VERSION_NUMBER, VERSION_FLAVOUR); }
45 } 48 }
46 49
47 public static string GetVersionString(string versionNumber) 50 public static string GetVersionString(string versionNumber, Flavour flavour)
48 { 51 {
49 string versionString = "OpenSimulator Server" + versionNumber; 52 string versionString = "OpenSim " + versionNumber + " (" + flavour + ")";
50 return versionString.PadRight(VERSIONINFO_VERSION_LENGTH); 53 return versionString.PadRight(VERSIONINFO_VERSION_LENGTH);
51 } 54 }
52 55