mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 07:04:57 +01:00
Compilation is blocked if TGS3.json changes. Adds command/button to update it
This commit is contained in:
@@ -9,7 +9,7 @@ namespace TGCommandLine
|
||||
public RepoCommand()
|
||||
{
|
||||
Keyword = "repo";
|
||||
Children = new Command[] { new RepoSetupCommand(), new RepoUpdateCommand(), new RepoGenChangelogCommand(), new RepoPushChangelogCommand(), new RepoPythonPathCommand(), new RepoSetEmailCommand(), new RepoSetNameCommand(), new RepoMergePRCommand(), new RepoListPRsCommand(), new RepoStatusCommand(), new RepoListBackupsCommand(), new RepoCheckoutCommand(), new RepoResetCommand() };
|
||||
Children = new Command[] { new RepoSetupCommand(), new RepoUpdateCommand(), new RepoGenChangelogCommand(), new RepoPushChangelogCommand(), new RepoPythonPathCommand(), new RepoSetEmailCommand(), new RepoSetNameCommand(), new RepoMergePRCommand(), new RepoListPRsCommand(), new RepoStatusCommand(), new RepoListBackupsCommand(), new RepoCheckoutCommand(), new RepoResetCommand(), new RepoUpdateJsonCommand() };
|
||||
}
|
||||
public override string GetHelpText()
|
||||
{
|
||||
@@ -17,6 +17,30 @@ namespace TGCommandLine
|
||||
}
|
||||
}
|
||||
|
||||
class RepoUpdateJsonCommand : Command
|
||||
{
|
||||
public RepoUpdateJsonCommand()
|
||||
{
|
||||
Keyword = "update-json";
|
||||
}
|
||||
|
||||
public override string GetHelpText()
|
||||
{
|
||||
return "Updates the cached TGS3.json with the one from the repo. Compilation is blocked if these two do not match.";
|
||||
}
|
||||
|
||||
protected override ExitCode Run(IList<string> parameters)
|
||||
{
|
||||
var res = Server.GetComponent<ITGRepository>().UpdateTGS3Json();
|
||||
if (res != null)
|
||||
{
|
||||
OutputProc(res);
|
||||
return ExitCode.ServerError;
|
||||
}
|
||||
return ExitCode.Normal;
|
||||
}
|
||||
}
|
||||
|
||||
class RepoSetupCommand : Command
|
||||
{
|
||||
public RepoSetupCommand()
|
||||
|
||||
Reference in New Issue
Block a user