user210757
user210757

Reputation: 7386

Monorepo with a common library release to only update one project

I have a monorepo, that has say 5 .net core APIs, and the all use several common libraries:

/api1
/api2
...
/api5
/common1
/common2

I am using a single master branch strategy and want my master branch in sync with what is deployed to my production environment.

These are all using .net Core 2.2; I want to upgrade them all to .net core 3. However I need to get "api1" out to production quickly, and don't have time to upgrade all the APIs, I just want to update api1 and the common libs. However if I do this, all my other APIs will be in a broken state in the master branch.

I was thinking I could create a release branch of the state now, and create another release branch for the upgraded API and common libs? However that means the master branch becomes kind of a dev branch, not representative of what is deployed in production? How do I solve this?

Also, how do you make single API Git branches for releases rather than a release branch for the whole monorepo? (/releases/ap1/1.1) Do you just ignore everything but the API the release is for?

Upvotes: 1

Views: 684

Answers (1)

VonC
VonC

Reputation: 1327184

These are all using .net Core 2.2; I want to upgrade them all to .net core 3. However I need to get "api1" out to production ASAP, and don't have time to upgrade all the APIS, I just want to update api1 and the common libs.
However if I do this, all my other apis will be in a broken state in the master branch.

That cannot be avoided, if you want master to represents what is deployed in production.

The development of the other (now broken in master) api will have to take place in a dev branch, before being merged back to master when they are ready to be released.

Upvotes: 1

Related Questions