* We have strand flavours.
* The version string is now reported as "OpenSim 0.6.5 (Dev)" * This has to be administrated manually.0.6.6-post-fixes
parent
5d23ecebeb
commit
b773a3a02f
|
@ -17,8 +17,10 @@ namespace OpenSim.Framework.Servers.Tests
|
||||||
[Test]
|
[Test]
|
||||||
public void TestGetVersionStringLength()
|
public void TestGetVersionStringLength()
|
||||||
{
|
{
|
||||||
Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.GetVersionString("0.0.0").Length, "0.0.0 failed");
|
foreach (VersionInfo.Flavour flavour in Enum.GetValues(typeof(VersionInfo.Flavour)))
|
||||||
Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.GetVersionString("9.99.99").Length, "9.99.99 failed");
|
{
|
||||||
|
Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.GetVersionString("0.0.0", flavour).Length, "0.0.0/" + flavour + " failed");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,24 +29,27 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
public class VersionInfo
|
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,
|
Unknown,
|
||||||
Dev,
|
Dev,
|
||||||
RC1,
|
RC1,
|
||||||
RC2,
|
RC2,
|
||||||
Release
|
Release,
|
||||||
|
Post_Fixes
|
||||||
}
|
}
|
||||||
private const string m_versionNumber = "0.6.5";
|
|
||||||
|
|
||||||
public static string Version
|
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);
|
return versionString.PadRight(VERSIONINFO_VERSION_LENGTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue