Commit 7937e19
authored
Parameterize bundle ID and build workflow for identical sister-repo code (#690)
* Derive Fastlane bundle identifiers from app_suffix
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.
* Make swiftformat and build workflow identical across sister repos
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.
* Keep swiftformat folder guard intact
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.
* Sync sister repos by mirroring instead of patching
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.
* Trim release.sh sync excludes to existing dirs only
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.
* Preserve each sister's cron minute instead of hardcoding it
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.
* Define sister build minute in the release script, not the sister repo
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.1 parent 8bd6575 commit 7937e19
3 files changed
Lines changed: 78 additions & 50 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
26 | 47 | | |
27 | 48 | | |
28 | 49 | | |
| |||
40 | 61 | | |
41 | 62 | | |
42 | 63 | | |
43 | | - | |
| 64 | + | |
44 | 65 | | |
45 | 66 | | |
46 | 67 | | |
| |||
55 | 76 | | |
56 | 77 | | |
57 | 78 | | |
58 | | - | |
59 | | - | |
| 79 | + | |
| 80 | + | |
60 | 81 | | |
61 | 82 | | |
62 | 83 | | |
| |||
66 | 87 | | |
67 | 88 | | |
68 | 89 | | |
69 | | - | |
| 90 | + | |
70 | 91 | | |
71 | 92 | | |
72 | 93 | | |
73 | 94 | | |
74 | 95 | | |
75 | | - | |
76 | | - | |
| 96 | + | |
| 97 | + | |
77 | 98 | | |
78 | 99 | | |
79 | 100 | | |
| |||
87 | 108 | | |
88 | 109 | | |
89 | 110 | | |
90 | | - | |
91 | | - | |
| 111 | + | |
| 112 | + | |
92 | 113 | | |
93 | | - | |
| 114 | + | |
94 | 115 | | |
95 | 116 | | |
96 | 117 | | |
| |||
138 | 159 | | |
139 | 160 | | |
140 | 161 | | |
141 | | - | |
| 162 | + | |
142 | 163 | | |
143 | 164 | | |
144 | 165 | | |
145 | | - | |
146 | | - | |
| 166 | + | |
| 167 | + | |
147 | 168 | | |
148 | 169 | | |
149 | 170 | | |
| |||
166 | 187 | | |
167 | 188 | | |
168 | 189 | | |
169 | | - | |
170 | | - | |
| 190 | + | |
| 191 | + | |
171 | 192 | | |
172 | 193 | | |
173 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
46 | 61 | | |
47 | 62 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
54 | 69 | | |
55 | 70 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| |||
124 | 134 | | |
125 | 135 | | |
126 | 136 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
134 | 141 | | |
135 | | - | |
136 | | - | |
| 142 | + | |
| 143 | + | |
137 | 144 | | |
138 | 145 | | |
139 | 146 | | |
| |||
0 commit comments