You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/gh-actions/gh-customize.md
+81-50Lines changed: 81 additions & 50 deletions
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,13 @@
5
5
6
6
The entire procedure may change without warning, so be prepared for updates.
7
7
8
+
Right now - you have to repeat the customization for each new release - we are working on an easier process.
9
+
8
10
WARNING - After a recent release - wait for the release number to be updated on this page before using any of the copy/paste commands.
9
11
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.
12
15
13
16
!!! info "Time Estimate"
14
17
* 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.
51
54
52
55
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.
53
56
57
+
* DASH Pods: Use OmniBLE
58
+
* Eros Pods: Use OmniKit
59
+
54
60
This table lists all the modules referred to on the Code Customization page linked above:
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
70
77
71
78
## Create a Fork for Selected Module
72
79
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
+
73
88
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.
74
89
75
90
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
90
105
| LoopKit/Loop | dev |
91
106
| LoopKit/LoopKit | dev |
92
107
| LoopKit/OmniBLE | dev |
93
-
|ps2/rileylink_ios|dev|
108
+
|LoopKit/OmniKit|main|
94
109
95
110
The LoopWorkspace main branch is always the most recent released code.
96
111
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
+
97
116
!!! tip "Pro Tip"
98
117
If you know you want to change more than one Module, go on and prepare the forks for each Modules you want to customize.
99
118
@@ -106,18 +125,26 @@ This page has instructions for applying customizations to released code, main br
106
125
107
126
## Open Module in Codespaces
108
127
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
110
137
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.
112
139
113
140
1. Right click (or control click) on [Codespaces](https://github.com/codespaces)
114
141
* This opens a new tab in your browser
115
142
* Click on the green button on the right that says `New Codespace`
116
143
1. On new screen
117
144
* 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)
118
145
* 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
121
148
* You do not need to modify the region or machine type
122
149
* Click on the green button at the bottom that says `Create codespace`
123
150
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
131
158
* You can click on that link for more information if desired, or just follow instructions below.
132
159
* There are 5 sections of the display labeled with numbers inside red circles
133
160
134
-
135
161
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).
136
162
137
163
### Codespace Terminal
138
164
139
165
1. The terminal window should be showing in the panel section (indicated by the number 4)
* the branch is the default branch for this Module (dev or main)
144
171
* this is where you will paste the command you're about to copy
145
172
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.
147
174
148
175
### First Time for this Module
149
176
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.
151
178
152
179
This process has two steps:
153
180
@@ -168,66 +195,70 @@ After these two steps are completed, then you will continue to [Customize the Mo
168
195
Copy the selected line for the current module into the terminal. If you see an error STOP.
169
196
170
197
* Did you copy the correct line for the current Module?
Copy and paste the next command to create a special branch in your fork that matches the released code for this Module.
200
231
201
232
```{ .sh .copy }
202
-
git switch -c main_3.2
233
+
git switch -c main_3.2.1
203
234
```
204
235
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'`
206
237
207
238
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.
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.)
217
248
218
249
{width="750"}
219
250
{align="center"}
220
251
221
252
!!! success "What did those steps accomplish?"
222
253
You now have 3 branches in your Codespace (local) and your GitHub (remote) versions of your repository for this Module:
223
254
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
227
258
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.
229
260
230
-
Next step, you will modify main_3.2_custom.
261
+
Next step, you will modify main_3.2.1_custom.
231
262
232
263
Skip ahead to [Customize the Module](#customize-the-module) and make the changes to this branch that you want for your Module.
233
264
@@ -242,12 +273,12 @@ If you are returning to change a customization you've already made, follow these
242
273
1. If your Codespace for this Module does not exist:
243
274
* Click on the green button on the right that says `New Codespace`
244
275
* 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
246
277
* You do not need to modify the region or machine type
247
278
* Click on the green button at the bottom that says `Create codespace`
248
279
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
249
280
1. In the terminal window, you should see the line:
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.
332
363
333
-
* Click on the branch and choose main_3.2_custom
364
+
* Click on the branch and choose main_3.2.1_custom
334
365
* Click on the clock item to the right
335
366
* This brings up the commit history screen
336
367
* 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
341
372
342
373
### First Modification
343
374
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.
345
376
346
377
Open the Codespace and select your fork of LoopWorkspace **main** branch.
347
378
348
379
Copy and paste the following lines into your terminal:
Then skip ahead to [Modify LoopWorkspace](#modify-loopworkspace).
356
387
357
388
### Subsequent Modifications
358
389
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.
360
391
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.
362
393
363
394
### Modify LoopWorkspace
364
395
@@ -372,7 +403,7 @@ Click on sync changes.
372
403
373
404
Return to your GitHub window for LoopWorkspaces.
374
405
375
-
* Modify the default branch to be main_3.2_custom
406
+
* Modify the default branch to be main_3.2.1_custom
376
407
* Click on Action: Build Loop
377
408
378
409
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
425
456
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:
You now have a "patch" text file. Download and save this file on your computer.
441
472
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.
443
474
444
475
{width="750"}
0 commit comments