Skip to content

Commit b91077b

Browse files
committed
Update GitHub customization for 3.2.1
1 parent aa50569 commit b91077b

File tree

1 file changed

+81
-50
lines changed

1 file changed

+81
-50
lines changed

docs/gh-actions/gh-customize.md

Lines changed: 81 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55

66
The entire procedure may change without warning, so be prepared for updates.
77

8+
Right now - you have to repeat the customization for each new release - we are working on an easier process.
9+
810
WARNING - After a recent release - wait for the release number to be updated on this page before using any of the copy/paste commands.
911

10-
This page has not been updated for Loop 3.2.1.
11-
Please be patient - the location for customization for Eros pods has changed and will be updated on this page and [Code Customization](../build/code_customization.md) page - but later.
12+
This page was updated for Loop 3.2.1 on 22-March-2023.
13+
14+
**NOTE** The location for customization for Eros pods has changed. It is now in the OmniKit module. (DASH = OmniBLE, Eros = OmniKit). Expect more changes in the future.
1215

1316
!!! info "Time Estimate"
1417
* About half an hour to an hour per Module
@@ -51,14 +54,18 @@ You will need a text editor to format a command line for each module you change.
5154

5255
Decide which [Code Customization](../build/code_customization.md) you want to make. Each customization lists a Module name. You will want a fork for each Module you wish to modify.
5356

57+
* DASH Pods: Use OmniBLE
58+
* Eros Pods: Use OmniKit
59+
5460
This table lists all the modules referred to on the Code Customization page linked above:
5561

56-
| Folder | Module | Fork From |
57-
| --- | --- | --- |
58-
| Loop/LoopCore | Loop | [https://github.com/LoopKit/Loop](https://github.com/LoopKit/Loop) |
59-
| LoopKit/LoopKitUI/Extensions | LoopKit | [https://github.com/LoopKit/LoopKit](https://github.com/LoopKit/LoopKit) |
60-
| OmniBLE/OmniBLE/PumpManagerUI | OmniBLE | [https://github.com/LoopKit/OmniBLE](https://github.com/LoopKit/OmniBLE) |
61-
| rileylink_ios/OmniKit/OmnipodCommon | rileylink_ios | [https://github.com/ps2/rileylink_ios](https://github.com/ps2/rileylink_ios) |
62+
| Module | Fork From |
63+
| --- | --- |
64+
| Loop | [https://github.com/LoopKit/Loop](https://github.com/LoopKit/Loop) |
65+
| LoopKit | [https://github.com/LoopKit/LoopKit](https://github.com/LoopKit/LoopKit) |
66+
| OmniBLE | [https://github.com/LoopKit/OmniBLE](https://github.com/LoopKit/OmniBLE) |
67+
| OmniKit | [https://github.com/LoopKit/OmniKit](https://github.com/LoopKit/OmniKit) |
68+
6269

6370
!!! tip "Pro Tip"
6471
Open 4 browser tabs or windows so you can click to switch locations.
@@ -70,6 +77,14 @@ This table lists all the modules referred to on the Code Customization page link
7077

7178
## Create a Fork for Selected Module
7279

80+
!!! warning "New Release"
81+
If you have previously used this process for a prior release, use the same Modules you already forked.
82+
83+
1. Go to the branch for each Module (dev or main) that is the default branch in the table above.
84+
2. Sync that branch
85+
86+
Skip ahead to [Open Module in Codespaces](#open-module-in-codespaces).
87+
7388
If you want a modification that uses a particular module, you must fork that module to your GitHub account. You will repeat the Fork and Modify steps for each module.
7489

7590
1. Log into your GitHub account
@@ -90,10 +105,14 @@ When you fork a repository, the default branch is the one that is forked. That i
90105
| LoopKit/Loop | dev |
91106
| LoopKit/LoopKit | dev |
92107
| LoopKit/OmniBLE | dev |
93-
| ps2/rileylink_ios | dev |
108+
| LoopKit/OmniKit | main |
94109

95110
The LoopWorkspace main branch is always the most recent released code.
96111

112+
* WARNING - After a recent release
113+
* Wait for the release number to be updated on this page before using any of the copy/paste commands
114+
* Check the top of this page for the release message
115+
97116
!!! tip "Pro Tip"
98117
If you know you want to change more than one Module, go on and prepare the forks for each Modules you want to customize.
99118

@@ -106,18 +125,26 @@ This page has instructions for applying customizations to released code, main br
106125

107126
## Open Module in Codespaces
108127

109-
Now that the selected module fork exists in your GitHub account, you will open it in Codespaces. (If you are returning to change a customization you've already made, be sure to select the branch where you already made the previous customization; [Update Customization](#update-customization)).
128+
!!! warning "New Release"
129+
If you have previously used this process for a prior release, use the same Modules you already forked. Make sure you sync each Module to LoopKit.
130+
131+
You need to repeat this section to create the main_3.2.1 branches for each Module you want to customize.
132+
133+
Now that the selected module fork exists in your GitHub account, you will open it in Codespaces.
134+
135+
* If you are returning to change a customization you've already made to version 3.2.1, be sure to select the branch where you already made the previous customization; [Update Customization](#update-customization)
136+
* If you are returning to add customization to an updated version of Loop, you must complete this section
110137

111-
For this portion of the process, work with a single Module until you are done with the customization for that module. The final step will be to create and save a special command you will use when setting up the LoopWorkspace later.
138+
For this portion of the process, work with a single Module until you are done with the customization for that module. Repeat this for all Modules and then move on to setting up the LoopWorkspace.
112139

113140
1. Right click (or control click) on [Codespaces](https://github.com/codespaces)
114141
* This opens a new tab in your browser
115142
* Click on the green button on the right that says `New Codespace`
116143
1. On new screen
117144
* Click on Select a repository and choose your GitHub username/moduleName for the module you want to modify (you can start typing your username if there are too many choices)
118145
* You will see a message the `Codespace usage for this repository is paid for by username` - you get 60 free hours per month, so you can ignore this message
119-
* First time - leave the branch alone (dev)
120-
* Subsequent times - select your customized branch, e.g., main_3.2_custom
146+
* First time - leave the branch alone (dev or main depending on Module)
147+
* Subsequent times - select your customized branch, e.g., main_3.2.1_custom
121148
* You do not need to modify the region or machine type
122149
* Click on the green button at the bottom that says `Create codespace`
123150
1. A message appears saying setting up your codespace; and then the Codespaces screen appears showing the README.md file (by default) for that repository
@@ -131,23 +158,23 @@ For this portion of the process, work with a single Module until you are done wi
131158
* You can click on that link for more information if desired, or just follow instructions below.
132159
* There are 5 sections of the display labeled with numbers inside red circles
133160

134-
135161
If you have already made a customization in this module and you are returning for another modification, skip to [Customize the Module](#customize-the-module).
136162

137163
### Codespace Terminal
138164

139165
1. The terminal window should be showing in the panel section (indicated by the number 4)
140166
1. You should see::<br>
141-
```@username -> /workspaces/moduleName (dev) $```
167+
```@username -> /workspaces/moduleName (branch) $```
142168
* where your username is after the @ symbol
143169
* and the current Module replaces moduleName
170+
* the branch is the default branch for this Module (dev or main)
144171
* this is where you will paste the command you're about to copy
145172

146-
The commands you paste depend on whether this is the first time you've worked with the Module or if you have already started customizing it and thus already have a main_3.2_custom branch created.
173+
The commands you paste depend on whether this is the first time you've worked with the Module or if you have already started customizing it and thus already have a main_3.2.1_custom branch created.
147174

148175
### First Time for this Module
149176

150-
These commands are used ONLY for released version of Loop and only the first time you work with a given Module.
177+
These commands are used ONLY for released version of Loop and only the first time you work with a given Module. This page is configured for released version 3.2.1.
151178

152179
This process has two steps:
153180

@@ -168,66 +195,70 @@ After these two steps are completed, then you will continue to [Customize the Mo
168195
Copy the selected line for the current module into the terminal. If you see an error STOP.
169196

170197
* Did you copy the correct line for the current Module?
171-
* Is your Module dev branch up to date?
198+
* Is your Module branch (dev or main) up to date?
172199

173-
#### Prepare Loop Module (Loop 3.2.0)
200+
#### Prepare Loop Module (Loop 3.2.1)
174201

175202
``` { .sh .copy }
176-
git checkout -q a1fb919703987bf5daad390f589fec3481953c33
203+
git checkout -q 01eb87693ffb832aa8fb92692438a986ec7270e9
177204
```
178205

179-
#### Prepare LoopKit Module (Loop 3.2.0)
206+
#### Prepare LoopKit Module (Loop 3.2.1)
180207

181208
``` { .sh .copy }
182-
git checkout -q 6073eb1f4adaaeeb449589c21f251db2138b2c89
209+
git checkout -q 9835a29f1bac9f75023f39c376479a2e6a6c8ccd
183210
```
184211

185-
#### Prepare OmniBLE Module (Loop 3.2.0)
212+
#### Prepare OmniBLE Module (Loop 3.2.1)
213+
214+
(DASH)
186215

187216
``` { .sh .copy }
188-
git checkout -q 41bd40f4f0a074e60e0f9a763358a99519e43dcb
217+
git checkout -q f21360781c0b8eee26c531d20f1b0aa192a227f2
189218
```
190219

191-
#### Prepare rileylink_ios Module (Loop 3.2.0)
220+
#### Prepare OmniKit Module (Loop 3.2.1)
221+
222+
(Eros)
192223

193224
``` { .sh .copy }
194-
git checkout -q 8a68c41e2ce05e47e1a5707d0c4ad05309bd3861
225+
git checkout -q c1e0d395975c93d15b3f84ac21097e40b7d5d93f
195226
```
196227

197228
### Create the Custom Branch
198229

199230
Copy and paste the next command to create a special branch in your fork that matches the released code for this Module.
200231

201232
``` { .sh .copy }
202-
git switch -c main_3.2
233+
git switch -c main_3.2.1
203234
```
204235

205-
You should see the response: `Switched to a new branch 'main_3.2'`
236+
You should see the response: `Switched to a new branch 'main_3.2.1'`
206237

207238
Assuming no error, copy and paste these commands next. You will see a popup asking you if you want to paste multiple lines. Say yes and check the box to not ask again.
208239

209240
``` { .sh .copy }
210-
git push -q --set-upstream origin main_3.2
241+
git push -q --set-upstream origin main_3.2.1
211242
git pull
212-
git switch -c main_3.2_custom
213-
git push -q --set-upstream origin main_3.2_custom
243+
git switch -c main_3.2.1_custom
244+
git push -q --set-upstream origin main_3.2.1_custom
214245
```
215246

216-
You should see the items you pasted in the terminal followed by responses talking about the `remote` (your GitHub repository) and how to create a pull request; that you are already up to date; that you switched to a new branch and then another `remote` message. Your screen should be similar to the graphic below. (Note: this graphic was prepared for Loop 3.0.0. Now that Loop 3.2.0 is released, your terminal will show the SHA-1 for Loop 3.2.0.)
247+
You should see the items you pasted in the terminal followed by responses talking about the `remote` (your GitHub repository) and how to create a pull request; that you are already up to date; that you switched to a new branch and then another `remote` message. Your screen should be similar to the graphic below. (Note: this graphic was prepared for Loop 3.0.0. Now that Loop 3.2.1 is released, your terminal will show the SHA-1 for Loop 3.2.1.)
217248

218249
![Codespaces screen after setting up branches](img/codespace-new-branches-loop.png){width="750"}
219250
{align="center"}
220251

221252
!!! success "What did those steps accomplish?"
222253
You now have 3 branches in your Codespace (local) and your GitHub (remote) versions of your repository for this Module:
223254

224-
* dev
225-
* main_3.2
226-
* main_3.2_custom
255+
* dev or main (depending on Module)
256+
* main_3.2.1
257+
* main_3.2.1_custom
227258

228-
Right now main_3.2 and main_3.2_custom are identical and match the released copy for that Module.
259+
Right now main_3.2.1 and main_3.2.1_custom are identical and match the released copy for that Module.
229260

230-
Next step, you will modify main_3.2_custom.
261+
Next step, you will modify main_3.2.1_custom.
231262

232263
Skip ahead to [Customize the Module](#customize-the-module) and make the changes to this branch that you want for your Module.
233264

@@ -242,12 +273,12 @@ If you are returning to change a customization you've already made, follow these
242273
1. If your Codespace for this Module does not exist:
243274
* Click on the green button on the right that says `New Codespace`
244275
* Click on Select a repository and choose your GitHub username/moduleName for the Module you want to modify
245-
* Select your customized branch, e.g., main_3.2_custom
276+
* Select your customized branch, e.g., main_3.2.1_custom
246277
* You do not need to modify the region or machine type
247278
* Click on the green button at the bottom that says `Create codespace`
248279
1. A message appears saying setting up your codespace; and then the Codespaces screen appears showing the README.md file (by default) for that repository
249280
1. In the terminal window, you should see the line:
250-
```@username -> /workspaces/moduleName (main_3.2_custom) $```
281+
```@username -> /workspaces/moduleName (main_3.2.1_custom) $```
251282

252283
Continue with [Customize the Module](#customize-the-module).
253284

@@ -282,7 +313,7 @@ When you are done with the changes for this Module, you will need to:
282313
1. Commit the change (to your local copy in Codespaces)
283314
1. Sync the change (to your GitHub fork)
284315

285-
You will see a warning `This action will pull and push commits from and to "origin/main_3.2_custom".`
316+
You will see a warning `This action will pull and push commits from and to "origin/main_3.2.1_custom".`
286317

287318
Select `OK, don't show again'
288319

@@ -330,7 +361,7 @@ git update-index --cacheinfo 160000 0123456789abcdef0123456789abcdef01234567 "ri
330361

331362
For each Module you customized, return to your GitHub fork for that Module (`https://github.com/username/moduleName`) to get the SHA-1 for that Module.
332363

333-
* Click on the branch and choose main_3.2_custom
364+
* Click on the branch and choose main_3.2.1_custom
334365
* Click on the clock item to the right
335366
* This brings up the commit history screen
336367
* Your last commit should be the top one
@@ -341,24 +372,24 @@ Prepare the commands for each Module customization you want for this build in yo
341372

342373
### First Modification
343374

344-
Only use this section if you have not previously created the main_3.2_custom branch for LoopWorkspace.
375+
Only use this section if you have not previously created the main_3.2.1_custom branch for LoopWorkspace.
345376

346377
Open the Codespace and select your fork of LoopWorkspace **main** branch.
347378

348379
Copy and paste the following lines into your terminal:
349380

350381
``` { .sh .copy }
351-
git switch -c main_3.2_custom
352-
git push -q --set-upstream origin main_3.2_custom
382+
git switch -c main_3.2.1_custom
383+
git push -q --set-upstream origin main_3.2.1_custom
353384
```
354385

355386
Then skip ahead to [Modify LoopWorkspace](#modify-loopworkspace).
356387

357388
### Subsequent Modifications
358389

359-
Only use this section if you have created the main_3.2_custom branch for LoopWorkspace; but want to add a new modification.
390+
Only use this section if you have created the main_3.2.1_custom branch for LoopWorkspace; but want to add a new modification.
360391

361-
Open (or reopen) the Codespace and select your fork of LoopWorkspace **main_3.2_custom** branch.
392+
Open (or reopen) the Codespace and select your fork of LoopWorkspace **main_3.2.1_custom** branch.
362393

363394
### Modify LoopWorkspace
364395

@@ -372,7 +403,7 @@ Click on sync changes.
372403

373404
Return to your GitHub window for LoopWorkspaces.
374405

375-
* Modify the default branch to be main_3.2_custom
406+
* Modify the default branch to be main_3.2.1_custom
376407
* Click on Action: Build Loop
377408

378409
In about 1 hour, your customized Loop will be available for installation on your phone via TestFlight.
@@ -425,12 +456,12 @@ If you want to create a text file with a patch for your customization, you will
425456
If you don't see the green `Compare & pull request` icon, modify the following URL with your username and the desired Module name and click on the `Create pull request` icon instead:
426457

427458
```
428-
https://github.com/loopdocs-tester/Loop/compare/main...main_3.2_custom
459+
https://github.com/loopdocs-tester/Loop/compare/main...main_3.2.1_custom
429460
```
430461

431462
* Click on the green `Compare & pull request` icon
432463
* Change the LoopKit (or ps2) username to your username
433-
* Change the branch from dev to main_3.2
464+
* Change the branch from dev to main_3.2.1
434465
* Scroll down to review the changes you just made
435466
* Then click the green Create pull request button
436467
* **DO NOT MERGE** the pull request
@@ -439,7 +470,7 @@ https://github.com/loopdocs-tester/Loop/compare/main...main_3.2_custom
439470

440471
You now have a "patch" text file. Download and save this file on your computer.
441472

442-
The default name when you select File->Save Page As, is 1.patch.txt. It's a good idea to revise this. For the graphic below, the filename was modified to `Loop_main_3.2_custom_1.patch.txt` and a folder called `patches` in Downloads was used for storage.
473+
The default name when you select File->Save Page As, is 1.patch.txt. It's a good idea to revise this. For the graphic below, the filename was modified to `Loop_main_3.2.1_custom_1.patch.txt` and a folder called `patches` in Downloads was used for storage.
443474

444475
![browser screen for saving the patch](img/patch-saved-for-loop.png){width="750"}
445476
{align="center"}

0 commit comments

Comments
 (0)