Changelog fails don't stop

This commit is contained in:
Cyberboss
2017-07-18 10:41:23 -04:00
parent 52d517241f
commit ac80fd8dc4
2 changed files with 17 additions and 18 deletions
+6 -6
View File
@@ -53,14 +53,14 @@ namespace TGCommandLine
if (gen_cl)
{
var res = Repo.GenerateChangelog(out string error2);
if(res != null)
{
OutputProc(res);
return ExitCode.ServerError;
}
res = Repo.PushChangelog();
if (res != null)
OutputProc(res);
else
{
res = Repo.PushChangelog();
if (res != null)
OutputProc(res);
}
}
var resu = Server.GetComponent<ITGCompiler>().Compile(true);
OutputProc(resu ? "Compilation started!" : "Compilation could not be started!");
+11 -12
View File
@@ -383,16 +383,17 @@ namespace TGControlPanel
{
case FullUpdateAction.Testmerge:
updateError = Repo.MergePullRequest(testmergePR);
updateError = Repo.GenerateChangelog(out string error2);
if (updateError == null)
updateError = DM.Compile(true) ? null : "Compilation failed!";
{
updateError = Repo.GenerateChangelog(out string error2);
updateError = DM.Compile(true) ? updateError : "Compilation failed!";
}
break;
case FullUpdateAction.UpdateHard:
updateError = Repo.Update(true);
updateError = Repo.GenerateChangelog(out error2);
if (updateError == null)
{
updateError = Repo.PushChangelog();
updateError = Repo.GenerateChangelog(out string error2) ?? Repo.PushChangelog();
error2 = DM.Compile(true) ? null : "Compilation failed!";
if(error2 != null)
updateError = error2;
@@ -400,26 +401,25 @@ namespace TGControlPanel
break;
case FullUpdateAction.UpdateHardTestmerge:
updateError = Repo.Update(true);
updateError = Repo.GenerateChangelog(out error2);
if (updateError == null)
{
updateError = Repo.PushChangelog();
updateError = Repo.GenerateChangelog(out string error2) ?? Repo.PushChangelog();
error2 = Repo.MergePullRequest(testmergePR);
if (error2 == null)
{
error2 = Repo.GenerateChangelog(out error2);
if (error2 == null)
error2 = DM.Compile(true) ? null : "Compilation failed!";
error2 = DM.Compile(true) ? error2 : "Compilation failed!";
}
updateError = error2 ?? updateError;
}
break;
case FullUpdateAction.UpdateMerge:
updateError = Repo.Update(false);
updateError = Repo.GenerateChangelog(out error2);
if (updateError == null)
{
updateError = Repo.PushChangelog();
updateError = Repo.GenerateChangelog(out string error2);
if(updateError == null)
Repo.PushChangelog(); //not an error 99% of the time if this fails, just a dirty tree
error2 = DM.Compile(true) ? null : "Compilation failed!";
if (error2 != null)
updateError = error2;
@@ -427,10 +427,9 @@ namespace TGControlPanel
break;
case FullUpdateAction.Reset:
updateError = Repo.Reset(true);
updateError = Repo.GenerateChangelog(out error2);
if (updateError == null)
{
updateError = Repo.PushChangelog();
updateError = Repo.GenerateChangelog(out string error2);
error2 = DM.Compile(true) ? null : "Compilation failed!";
if (error2 != null)
updateError = error2;