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
+25-22Lines changed: 25 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,18 @@
1
1
## Hot Topics
2
2
3
3
!!! tip "Pro Tip"
4
-
You can also use this same method to create a set of personal patches. You can use (and re-use) your patches with Mac-Xcode builds so you don't have to repeat the customization with every update.
4
+
The method on this page allows you to create a set of personal patches. You can use (and re-use) your patches with Mac-Xcode builds so you don't have to repeat the customization with every update.
5
5
6
6
* If you are building with Mac-Xcode method, you will use the same lines found in the [Prepare the Patches](#prepare-the-patches) section, but will paste them in your terminal to customize your code
7
7
8
-
!!! danger "DRAFT"
9
-
This procedure is in DRAFT mode - only minimal graphics are provided.
10
-
11
-
The entire procedure may change without warning, so be prepared for updates.
12
-
13
-
* 27-March 2023: Method updated and modified
14
-
* Improvement, you can reuse the customization with each update unless there is a conflict
15
-
* You will paste the patch into the build_loop.yml file (we'll tell you how)
16
-
17
-
WARNING - After a recent release - wait for the release number to be updated on this page before using any of the copy/paste commands.
8
+
!!! warning "Submodule Instructions"
9
+
This page has instructions to prepare branches for the Modules associated with LoopWorkspace that exactly match the current release. You can then edit that code and save (commit) the change to prepare your personal patch.
10
+
11
+
* You can often use the same patch for several releases
12
+
* If a patch that you prepared for an older release says "patch does not apply" when you use it, you'll need to prepare a new one
13
+
* Please wait for this page to be updated to the current release before generating an updated patch
18
14
19
-
This page was updated for Loop 3.2.1 on 22-March-2023.
* Module is where you made the customization (notice it is in multiple places)
118
115
* SHA-1 is the full identifier for the commit that has the change; there is a copy button to make this easy
119
-
* the `.patch` after the SHA-1 is github magic that formats that code change into a patch
116
+
* the `.patch` after the SHA-1 is GitHub magic that formats that code change into a patch
117
+
118
+
To view the exact code change associated with that patch, open a browser at the URL of `https://github.com/username/Module/commit/SHA-1`.
120
119
121
120
## Create a Fork for Selected Module
122
121
122
+
### Code Updates
123
+
123
124
!!! warning "New Release"
124
125
If you have previously used this process for a prior release, use the same Modules you already forked.
125
126
@@ -134,7 +135,9 @@ where:
134
135
135
136
Skip ahead to [Open Module in Codespaces](#open-module-in-codespaces).
136
137
137
-
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.
138
+
### New Fork
139
+
140
+
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.
138
141
139
142
1. Log into your GitHub account
140
143
1. Right click (or control click) on the URL in the table above
@@ -167,9 +170,9 @@ When you fork a repository, the default branch is the one that is forked. That i
167
170
This page has instructions for applying customizations to released code, main branch of LoopWorkspace. Don't worry that some of the other repositories have dev for the default branch. With the exception of the Loop module, everything you need to create your patches is included in the default branches of the lower level repositories (Modules). For Loop, you will also need a main branch. See [Connect Fork to New Branch](gh-update.md#connect-fork-to-new-branch)
168
171
169
172
!!! warning "Loop with LnL Patches"
170
-
Some Loop users build with the loopnlearn version of LoopWorkspace using the main_lnl_patches branch. At the current time, this process involves making your LoopWorkspace fork from loopnlearn instead of LoopKit. In the future, you will be able to get the same patches by a different method.
173
+
Some Loop users build with the loopnlearn version of LoopWorkspace using the [main_lnl_patches](https://www.loopandlearn.org/main-lnl-patches) branch. Initially, this process involved making your LoopWorkspace fork from loopnlearn instead of LoopKit. You have the option of deleting that fork and starting over with LoopKit and apply those same patches in the build-loop.yml file of your new fork, see [Loop and Learn: LnL Patches](https://www.loopandlearn.org/custom-code/#lnl-patches).
171
174
172
-
The process for creating your own customized patch is the same as those using the released code. There will be extra information about modifying the build_loop.yml depending on which LoopWorkspace you choose to fork (LoopKit or loopnlearn). But that documentation is not ready yet.
175
+
The process for creating your own customized patch is the same as those using the released code.
173
176
174
177
## Open Module in Codespaces
175
178
@@ -348,8 +351,6 @@ For each modification, there is a `Key_Phrase` to help you find the line of code
348
351
349
352
Click on the codespaces magnifying glass, paste the `Key_Phrase` into the search bar. If you use the copy icon and paste the `Key_Phrase`, you'll need to hit backspace to remove the extra return.
350
353
351
-
TO DO - put in a GIF showing making changes.
352
-
353
354
Make the change and save the file.
354
355
355
356
The source control icon now has a number showing. The number is how many different files in this Module that you have modified. Sometimes, more than one customization is added to a given file.
@@ -380,7 +381,7 @@ You are done with this module.
380
381
Click the Codespaces icon at bottom left.
381
382
Choose Stop Codespace from the menu. Don't worry about the changes won't be saved message - you just saved the changes with the sync command above.
382
383
383
-
The screen will then show the Codespace is stopped message. You can close the tab.
384
+
The screen will then show the Codespace is stopped message.
384
385
385
386
Return to your github account and look at the repository for the Module you just changed. It should be similar to the graphic below.
386
387
@@ -389,9 +390,11 @@ Return to your github account and look at the repository for the Module you just
389
390
390
391
## Prepare the Patches
391
392
392
-
While you have this Module open, go on an prepare the patch lines you will need to add to the build_loop.yml file.
393
+
You will prepare the patches looking at the repository under GitHub.
394
+
395
+
You will need the SHA-1 and the commit comment for each change you made in main_3.2.1_custom.
393
396
394
-
Add graphic showing several customizations with comments.
397
+
Add graphic showing GitHub fork with several customizations with comments.
395
398
396
399
Important: work from older (bottom) to newer (top) commits when creating the patches.
397
400
@@ -494,7 +497,7 @@ What if you already have a fork of one of the modules?
494
497
495
498
**Your existing fork is from a username other than LoopKit**
496
499
497
-
If your fork is from loopnlearn then you need to follow the directions (that are not written yet) on the loopandlearn dot org website.
500
+
If your fork is from loopnlearn and you want additional customizations, it is easist to delete that fork, make a new one from LoopKit, add the 6 Secrets to the new fork and as part of the changes to build_loop.yml, add the [Loop and Learn: LnL Patches](https://www.loopandlearn.org/custom-code/#lnl-patches) and you additional customizations.
498
501
499
502
If you know this is a fork you do not care about, you can delete the repository.
0 commit comments