shipkit
shipkit copied to clipboard
Propagating simple code changes along with dependency update
Problem
Sometimes we have a simple code change that needs to be propagated to multiple repositories and it's annoying to do it manually.
Solution
What if have a simple code update possible with every downstream upgrade? User would provide us with parameters:
- fileRegex - pattern for filtering out which files should be upgraded
- replaceRegex - pattern to find statements to be replaced in each file
- replaceSubstitution - replacement, can include group from replaceRegex, like $1
Eg. fileRegex = "*.gradle" replaceRegex = "org.mockito.mockito-release-tools" replaceSubstitution = "org.shipkit.shipkit"
All of these parameters could be specified in a file that would be named like "code-update-${VERSION}". Then we would look for files that match the just-released version when doing upgradeDownstream.
It's just an idea and probably not with a high priority (there are tasks for this feature that are more urgent), but I'm interested in what you think about it @mockito/shipkit-developers