0

I have a mono-repo project using turbo. Inside that mono-repo, I have multiple projects (3 apps). Now, one of my projects is done with development and needs to merge into the main branch. But, other apps are still in development. If I merge the others it will break the production. So, how do I specify only a single app that merges into the main branch?

prawito hudoro
  • 533
  • 1
  • 5
  • 10
  • 1
    I think you can't. Not an expert of monorepo but for me it's a prerequisite to either deploy everything at the same time or even if all are built and packaged in the same time, being able to deploy only the package validated. – Philippe Feb 02 '23 at 18:09
  • 1
    If I understand correctly you just need to make a branch that contains commits with only the changes you wish to merge. This is the same thing you do any time you wish to merge. (Monorepo or otherwise.) – TTT Feb 02 '23 at 22:38
  • My previous comment assumes you have changes to all 3 apps on the same branch; is that correct? If that's the problem, then perhaps a different wording of your question might be: "I have 3 apps modified in multiple commits on a single branch. How can I make a new branch that only contains changes to one of the apps?" If the apps are all in different folders this will be straight forward. – TTT Feb 03 '23 at 04:50
  • My bad who doesn't make a different branch for each app. So, now become difficult to deploy because of all apps are in the same branch. Maybe I will deploy it in the same deployment first, but for the next deployment, I will make a different branch for each app. Hope this method will be supported by vercel also. I'm still learning about mono repo architecture. – prawito hudoro Feb 03 '23 at 21:20
  • OK, if you have all code mixed together into commits on a single branch, then it's a valid question (and a good one, IMHO) to ask how to make a new branch with just the changes you want, in some sort of automated way. (This assumes all the code you need is in specific folders- is that true?) Perhaps re-wording the question that way would be helpful. I don't think the mono-repo portion is relevant to the question. (And we'll have to hunt around to see if there are dups, I feel like there might be but I'm not sure...) – TTT Feb 06 '23 at 16:45

0 Answers0