GLS had proposed this solution, although I'll admit I don't know enough about cmake to help much.
If we can't figure out how to do this automatically in the next week or so, I would recommend the following alternative solution.
When we're ready to release, make a new branch called...