Skip to content

Commit

Permalink
tools: Prompt to push release branches after creating them
Browse files Browse the repository at this point in the history
  • Loading branch information
jskeet committed Nov 7, 2024
1 parent 86d3acf commit c82ae59
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ protected override int ExecuteImpl(string[] args)
// Note: This takes into account the dry-run flag.
proposal.Execute(config);
}

if (config.DeferPush && proposals.Any(p => p.Completed))
{
Console.WriteLine();
Console.WriteLine("*****************************************************************************");
Console.WriteLine("* Don't forget to push the release branches with the push-releases command. *");
Console.WriteLine("*****************************************************************************");
}
return 0;

void MaybeLogProgress(int progress, int total)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ internal class ReleaseProposal
public StructuredVersion OldVersion { get; }
public StructuredVersion NewVersion { get; }
private HistoryFile ModifiedHistoryFile { get; }
public bool Completed { get; set; }

/// <summary>
/// The history file section being added, or null if this API does not have a version history.
Expand Down Expand Up @@ -140,6 +141,9 @@ public void Execute(BatchReleaseConfig config)
// Go back to our current branch
Commands.Checkout(repo, original);
Console.WriteLine();

// Remember that this proposal was completed (as far as the config goes).
Completed = true;
}

/// <summary>
Expand Down

0 comments on commit c82ae59

Please sign in to comment.