PeterJCLaw / srcomp-cli

Command line tools for interacting with the state of the Student Robotics Competition
https://github.com/PeterJCLaw/srcomp/wiki
0 stars 2 forks source link

Create mechanism to fetch a deployed version #11

Closed PeterJCLaw closed 1 year ago

PeterJCLaw commented 3 years ago

If you have multiple people interacting with a compstate during a competition, it would be really useful to be able to do something like srcomp pull from the deployments. This does introduce complexities if the deployments were to be out of step, though allowing the user to operate them like git remotes might be an option.

PeterJCLaw commented 1 year ago

Even just pulling down the deploy-<rev> branches could be a way to go here.

The common flow is:

You caaaan do git fetch srcomp@<host> deploy-<rev> and then merge/rebase on that, but that's a faff when you're trying to deploy things. It also ends up relying on knowing the internals.

A better flow would be at least for the deploy script to have pulled that revision down as a new branch (perhaps as deploy-<rev>) so the user can sort out the merge/rebase. Even better (though more risky if conflicts) would be to have the deploy script also do a rebase/merge/whatever itself and guide the user through that. Maybe only committing the result if clean and bailing if there are conflicts? Or maybe bailing if any of the same files are even touched? Definitely would need to re-run the validation after the merge though.