mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 23:17:20 +01:00
Installer wrapper (#74) [TGSDeploy]
* Add a version command * Remove service update from commandline * Ayy lmao * Fix * Final touches * Last thing * Can't break backwards compat I suppose * Version bump to 3.0.85.0 * Final cleanup * This time I swear * VERY LAST FUCKING THING * CANT STOP FUCKING UP THE UI * AHHHH!!!!! * Do not become like me kids
This commit is contained in:
@@ -22,5 +22,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("3.0.84.0")]
|
||||
[assembly: AssemblyFileVersion("3.0.84.0")]
|
||||
[assembly: AssemblyVersion("3.0.85.0")]
|
||||
[assembly: AssemblyFileVersion("3.0.85.0")]
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace TGCommandLine
|
||||
public RootCommand()
|
||||
{
|
||||
if (IsRealRoot()) //stack overflows
|
||||
Children = new Command[] { new UpdateCommand(), new TestmergeCommand(), new IRCCommand(), new RepoCommand(), new BYONDCommand(), new DMCommand(), new DDCommand(), new ConfigCommand(), new ChatCommand(), new ServiceUpdateCommand() };
|
||||
Children = new Command[] { new UpdateCommand(), new TestmergeCommand(), new IRCCommand(), new RepoCommand(), new BYONDCommand(), new DMCommand(), new DDCommand(), new ConfigCommand(), new ChatCommand() };
|
||||
}
|
||||
public override ExitCode Run(IList<string> parameters)
|
||||
{
|
||||
@@ -144,35 +144,4 @@ namespace TGCommandLine
|
||||
return "Merges the specified pull request and updates the server";
|
||||
}
|
||||
}
|
||||
|
||||
class ServiceUpdateCommand : Command
|
||||
{
|
||||
public ServiceUpdateCommand()
|
||||
{
|
||||
Keyword = "service-update";
|
||||
}
|
||||
|
||||
public override ExitCode Run(IList<string> parameters)
|
||||
{
|
||||
if (parameters.Count == 0 || parameters[0] != "--verify")
|
||||
Console.WriteLine("This command should only be used by the installer program. Please use the --verify option to confirm this command");
|
||||
else
|
||||
{
|
||||
Server.GetComponent<ITGSService>().StopForUpdate();
|
||||
GC.Collect();
|
||||
Thread.Sleep(10000);
|
||||
}
|
||||
return ExitCode.Normal;
|
||||
}
|
||||
|
||||
protected override string GetArgumentString()
|
||||
{
|
||||
return "[--verify]";
|
||||
}
|
||||
|
||||
protected override string GetHelpText()
|
||||
{
|
||||
return "Internal. Stops the service in preparation of an update operation.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user