RevenueCat / purchases-ios

In-app purchases and subscriptions made easy. Support for iOS, watchOS, tvOS, macOS, and visionOS.
https://www.revenuecat.com/
MIT License
2.22k stars 295 forks source link

split ci files #4027

Open aboedo opened 1 week ago

aboedo commented 1 week ago

CircleCI doesn't have direct support for splitting a config file into multiple, so this adds support for it a bit more manually:

It adds logic to our pre-commit hook to concatenate files in a configuration folder. This only runs if files in that folder have changed.

This is the basic file structure:

image

So all of the files in that folder, in order, comprise the config.yml file that looks pretty much identical to the one we had before.

This approach does take two assumptions: 1) developers will understand that they shouldn't edit the config.yml file directly (there's a warning in the file itself, and we could get fancier and detect this with git I suppose?) 2) developers will use the pre-commit hook (which... we should in any case, there's a reason we have it)

aboedo commented 1 week ago

@joshdholtz tagged you for early thoughts since you had had a stab at this in the past

aboedo commented 1 week ago

the diff makes this look big but there really are only 2 small files worth reviewing in here, the rest are mostly ignorable in they're cut / paste from the original config.yml file