diff options
author | lbsa71 | 2009-05-26 16:18:41 +0000 |
---|---|---|
committer | lbsa71 | 2009-05-26 16:18:41 +0000 |
commit | b773a3a02f35b5d15e6b8f9d2163439e1258d2d4 (patch) | |
tree | 799359349b21766be48e97d9f6acf0d085965aeb | |
parent | * Introduced GetVersionString so we can harness the whole thing. (diff) | |
download | opensim-SC-b773a3a02f35b5d15e6b8f9d2163439e1258d2d4.zip opensim-SC-b773a3a02f35b5d15e6b8f9d2163439e1258d2d4.tar.gz opensim-SC-b773a3a02f35b5d15e6b8f9d2163439e1258d2d4.tar.bz2 opensim-SC-b773a3a02f35b5d15e6b8f9d2163439e1258d2d4.tar.xz |
* We have strand flavours.
* The version string is now reported as "OpenSim 0.6.5 (Dev)"
* This has to be administrated manually.
-rw-r--r-- | OpenSim/Framework/Servers/Tests/VersionInfoTests.cs | 6 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/VersionInfo.cs | 15 |
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 | ||