Parameterize bundle ID and build workflow for identical sister-repo code#690
Open
bjorkert wants to merge 7 commits into
Open
Parameterize bundle ID and build workflow for identical sister-repo code#690bjorkert wants to merge 7 commits into
bjorkert wants to merge 7 commits into
Conversation
Read app_suffix from LoopFollowDisplayNameConfig.xcconfig in the Fastfile and build the app and Live Activity extension identifiers from it, replacing the hardcoded com.<team>.LoopFollow strings. The same Fastfile now produces the correct bundle identifiers in LoopFollow, LoopFollow_Second and LoopFollow_Third without per-repo edits. Update release.sh so the conflict notice no longer lists the Fastfile, which is now identical across the sister repositories.
Accept any LoopFollow* directory in Scripts/swiftformat.sh instead of only the
exact 'LoopFollow' folder, so formatting runs consistently in LoopFollow,
LoopFollow_Second and LoopFollow_Third.
Drive the variant name in build_LoopFollow.yml's not-configured summary from
${{ github.event.repository.name }} / ${{ env.UPSTREAM_REPO }} and drop the
variant name from two comments, so the workflow no longer hardcodes 'LoopFollow'
in cosmetic text. The only intentional per-repo differences left are the cron
minute and UPSTREAM_REPO.
The exact-'LoopFollow' folder check is intentional: it prevents swiftformat from reformatting source files when the tree is checked out as a sister repo (LoopFollow_Second / LoopFollow_Third), which would create spurious diffs. The script stays identical across all three repos and skips by folder name at runtime.
Replace the git diff / git apply patch flow in release.sh's update_follower with an rsync --delete mirror of the release tree into each sister repo, followed by re-applying that instance's overlay (app_suffix, display_name, UPSTREAM_REPO, cron) and renaming the workspace. The per-instance values are derived from the sister directory name; only the staggered cron minute is passed in. Mirroring makes each sister an exact copy of the release tree except for the overlay, so transfers no longer hit patch-context conflicts and any accidental drift in a sister is corrected automatically. Only .git, local/build dirs and the local team override (LoopFollowConfigOverride.xcconfig) are protected from the sync.
Drop the DerivedData and LoopFollowConfigOverride.xcconfig rsync excludes — they don't exist in any of the repos, so there is nothing to protect. The mirror now only shields .git, .claude and build.
Capture the sister's existing scheduled-build cron line before mirroring and restore it afterwards, rather than passing hardcoded minutes (27/40) into update_follower. Each repo keeps its own staggered build time with no magic numbers in the call sites; if a repo has no cron line the mirrored default is left in place.
Pass each app's staggered Sunday-build minute into update_follower and write it during the overlay, instead of capturing it from the sister repo. All per-app data lives in the main repo's release script; the sister owns nothing and is a pure product of the mirror plus the overlay. A comment at the call site explains the staggered minutes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The sister apps (
LoopFollow_Second,LoopFollow_Third) exist so users following 2–3 loopers can install separate apps with distinct bundle identifiers. They only need to differ from the main app by the bundle identifier and display name — both already driven byapp_suffix/display_nameinLoopFollowDisplayNameConfig.xcconfig. In practice a couple of build files still hardcodedLoopFollow, forcing them to diverge between the repos and making them a recurring merge-conflict source when changes are transferred on each release.This makes those files identical across all three repositories and reworks how they are kept in sync:
fastlane/Fastfile— readsapp_suffixfromLoopFollowDisplayNameConfig.xcconfigand derives the app and Live Activity extension identifiers from it, replacing every hardcodedcom.<team>.LoopFollowin thebuild_LoopFollow,identifiersandcertslanes. The same Fastfile now produces the correct identifiers everywhere:com.<team>.LoopFollow(unchanged)com.<team>.LoopFollow.Secondcom.<team>.LoopFollow.ThirdBecause the derived identifiers match what each repo is already provisioned for, existing certificates and provisioning profiles keep working unchanged.
.github/workflows/build_LoopFollow.yml— the not-configured summary now derives the variant name fromgithub.event.repository.name/UPSTREAM_REPOinstead of hardcoding it, and two comments no longer name the variant. The only intentional per-repo differences left are the scheduledcronminute andUPSTREAM_REPO.release.sh—update_followernow mirrors the release tree into each sister repo withrsync --deleteinstead of generating and applying a patch, then re-applies that instance's overlay (app_suffix,display_name,UPSTREAM_REPO,cron) and renames the workspace. The per-instance values are derived from the sister directory name; only the staggered cron minute is passed in. Mirroring makes each sister an exact copy of the release tree except for the overlay, so transfers no longer hit patch-context conflicts and any accidental drift is corrected automatically. Only.git, local/build directories and the local team override are protected from the sync.