using System;
using System.Collections.Generic;
namespace TGServerService.ChatCommands
{
///
/// Retrieves the git SHA of the live DreamDaemon code
///
sealed class RevisionCommand : ChatCommand
{
///
/// Construct a
///
public RevisionCommand()
{
Keyword = "revision";
}
///
protected override ExitCode Run(IList parameters)
{
var res = Instance.LiveSha();
if (res == "UNKNOWN")
{
OutputProc(res);
return ExitCode.ServerError;
}
OutputProc(String.Format("^{0}", res));
return ExitCode.Normal;
}
///
public override string GetHelpText()
{
return "Prints the current code revision of the repository (not the server)";
}
}
}