Skip to content

Commit 9b656c2

Browse files
committed
make github organization standard method, add Variable for certificate renewal
1 parent 1f620ce commit 9b656c2

File tree

6 files changed

+201
-55
lines changed

6 files changed

+201
-55
lines changed

docs/browser/bb-overview.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ The steps on these pages must be completed (in order) for you to build an app us
4444

4545
1. [Introduction and Summary](intro-summary.md){: target="_blank" }
4646
1. [Collect Secrets](secrets.md){: target="_blank" }
47+
* Some from *Apple*
48+
* Some from *GitHub*
4749
1. [Prepare Fork](prepare-fork.md){: target="_blank" }
4850
1. [Identifiers](identifiers.md){: target="_blank" }
4951
1. [Prepare App](prepare-app.md){: target="_blank" }
@@ -95,10 +97,14 @@ Instructions to make updates are found at:
9597

9698
* [Update with Browser](bb-update.md){: target="_blank" }
9799

98-
There is also a helpful video for this process. Once again, this was prepared for an earlier version 3.2.3 or older. With version 3.4.1 and newer, the update and build is automatic:
100+
There is also a helpful video for this process. Once again, this was prepared for an earlier version 3.2.3 or older. With version 3.4.1 and newer, the update and build is automatic if your *Apple* Developer account is active, agreements are signed and certificates are valid:
99101

100102
* [How to Update and Rebuild DIY Loop with a Web Browser](https://www.youtube.com/watch?v=0ipTsiqbbrQ){: target="_blank" }
101103

104+
After 3.6.0 is released, certificates will be automatically renewed. In the meantime, they must be renewed manually using these instructions:
105+
106+
* [Renew Certificates](bb-update.md#renew-certificate){: target="_blank" }
107+
102108
## Other Topics
103109

104110
### Building the Development Version of the App
@@ -117,7 +123,7 @@ These considerations were prepared when most people were using a Mac computer to
117123
* Compatible version of *Xcode* is provided by *GitHub*
118124
* The time required for the initial setup to build with a browser may take less time than one *macOS* and *Xcode* version update for those using [Build with *Mac*](../build/overview.md)
119125
* Automatic Updates are loaded into *TestFlight*
120-
* With version 3.4, builds are automatically prepared at least once a month
126+
* With version 3.4 and newer, builds are automatically prepared at least once a month
121127
* You choose when to install the new app from TestFlight onto your phone
122128
* Manual Updates are easy
123129
* Starting an update takes a few minutes of your time; it can be done from your phone; the rest is automatic and is done in about an hour

docs/browser/edit-browser.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
!!! warning "Modules vs Submodule"
1111
This page has instructions to set up your own <code>fork</code> for the Modules, otherwise known as submodules, associated with&nbsp;<span translate="no">LoopWorkspace</span>&nbsp;that are needed for a selected customization.
1212

13-
Each Module has its own *GitHub* <code>repository</code>;and you will be working with your <code>fork</code> of that Module at https://github.com/username/Module, where username is your username.
13+
Each Module has its own *GitHub* <code>repository</code>;and you will be working with your <code>fork</code> of that Module at https://github.com/my-name-org/Module, where username is your username.
14+
15+
If you are an experienced builder who set the Submodule changes up in your personal *GitHub* account, you can leave those forks where they are, i.e., https://github.com/my-name/Module. You do not build from Submodules, so no `Secrets` are required.
1416

1517
!!! question "What is a SHA-1?"
1618
SHA-1 means Secure Hash Algorithm 1; which is used to generate an alphanumeric code.
@@ -185,7 +187,7 @@ When you&nbsp;"<span translate="no">fork a repository"</span>, the default&nbsp;
185187
* Otherwise, when you a preparing a customization where the file changed sufficiently between `main` and `dev` and you want to build the `main` branch, you need to create a branch for this Module that is consistent with the version you wish to customize.
186188

187189
??? abstract "Use only if directed (Click to Open/Close)"
188-
Open your browser to your https://github.com/username/Module URL. If you already created the `branch` you need, you do not need to create a new one.
190+
Open your browser to your https://github.com/my-name-org/Module URL. If you already created the `branch` you need, you do not need to create a new one.
189191

190192
If you are customizing a released version, use the [Table of SHA-1](#table-of-sha-1) under your version number below. Copy the SHA-1 for your Module so you can paste it into the URL in Step 2 below. The suggested branch name is `v-#.#.#` where #.#.# corresponds to the version number for `main`. You will use this in Step 3.3 below.
191193

@@ -367,7 +369,7 @@ Save the customization lines in your text file for later use in the build_loop.y
367369

368370
``` { .sh .copy title="Customization Template:" }
369371
# Module: File: code customization description
370-
curl https://github.com/username/Module/commit/SHA-1.patch | git apply -v --directory=Module
372+
curl https://github.com/my-name-org/Module/commit/SHA-1.patch | git apply -v --directory=Module
371373
```
372374

373375
where:
@@ -379,7 +381,7 @@ where:
379381
* adding&nbsp;`.patch`&nbsp;after the SHA-1 informs *GitHub* to format that code change so it can be applied to your <code>fork</code>
380382
* the final&nbsp;<code> --directory=Module</code>&nbsp;is critical to apply the customization to the correct Module
381383

382-
To view the exact code change associated with that patch, open a browser at the URL of&nbsp;`https://github.com/username/Module/commit/SHA-1`.
384+
To view the exact code change associated with that patch, open a browser at the URL of&nbsp;`https://github.com/my-name-org/Module/commit/SHA-1`.
383385

384386
## Update&nbsp;<span translate="no">LoopWorkspace</span>
385387

@@ -412,11 +414,11 @@ Return to your&nbsp;<span translate="no">GitHub fork for LoopWorkspace</span>&nb
412414

413415
# Submodule Loop patches:
414416
# Loop: Filename: customization details
415-
#curl https://github.com/username/Loop/commit/SHA-1.patch | git apply -v --directory=Loop
417+
#curl https://github.com/my-name-org/Loop/commit/SHA-1.patch | git apply -v --directory=Loop
416418
417419
# Submodule LoopKit patches:
418420
# LoopKit: Filename: customization details
419-
#curl https://github.com/username/LoopKit/commit/SHA-1.patch | git apply -v --directory=LoopKit
421+
#curl https://github.com/my-name-org/LoopKit/commit/SHA-1.patch | git apply -v --directory=LoopKit
420422
421423
# Submodule xxxxx patches: Follow prototype above
422424

docs/browser/intro-summary.md

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@
2626
* [Collect the four *Apple* <code>Secrets</code>](secrets.md#collect-the-four-apple-secrets){: target="_blank" }
2727
* *GitHub*:
2828
* [Collect the <code>GH_PAT</code> Secret](secrets.md#collect-the-gh_pat-secret){: target="_blank" }
29+
* (Optional) [Create a Free *GitHub* Organization](secrets.md#create-a-free-github-organization){: target="_blank" } (strongly recommended)
2930
* [Make up a Password](secrets.md#make-up-a-password){: target="_blank" } and save it as your sixth `Secret`
3031

3132
Now it's time to use those <code>Secrets</code> to build the Loop app
3233

3334
* *GitHub*:
3435
* [`Fork` the repository (make your copy of <code>LoopWorkspace</code>)](prepare-fork.md#fork-loopworkspace){: target="_blank" }
35-
* [Add <code>Secrets</code> to your `fork`](prepare-fork.md#configure-secrets){: target="_blank" }
36+
* Using an organization? Add `Secrets` and `Variables` to your Organization and all your apps can use them
37+
* Not using an organization? You have to add `Secrets` and `Variables` to each repository individually
38+
* [Add <code>Secrets</code> to your `organization` or a single `fork`](prepare-fork.md#configure-secrets){: target="_blank" }
3639
* [`Action: 1. Validate Secrets`](identifiers.md#validate-secrets){: target="_blank" }
3740
* [`Action: 2. Add Identifiers`](identifiers.md#add-identifiers){: target="_blank" }
3841
* _<span translate="no">Apple</span>_:
@@ -61,6 +64,18 @@ The steps to configure for building with a browser require a lot of focused atte
6164

6265
* [Click here to find help](bb-errors.md#help-with-errors){: target="_blank" }.
6366

67+
???+ tips "Who should use a free GitHub Organization option (click to close/open)"
68+
There are several places where you see a recommendation to use a free GitHub Organization instead of building directly from your personal free GitHub account.
69+
70+
When you use an organization, you don't have to add 6 Secrets to each repository for every app you build. It can save a lot of time in the long run.
71+
72+
* Even if you just build Loop and nothing else, using an organization is pretty easy and your build works just the same as using only a personal account
73+
* Who should definitely build with an organization:
74+
* Anyone who is a caregiver will want LoopCaregiver or LoopFollow or both
75+
* Anyone who wants to use LoopFollow for the amazing alarm capabilties
76+
* Anyone who might want to try a customized version of Loop
77+
* Anyone who might want to try a different app such as xDrip4iOS or Trio
78+
6479
### The Short Version
6580

6681
Complete instructions are found at this link for those comfortable with using *GitHub* and navigating the *Apple Developer* and *Apple App Connect* pages.
@@ -103,7 +118,7 @@ You need to keep a digital copy of your 6 <code>Secrets</code>.
103118
!!! important "Use a Text-Only Editor"
104119
**Be sure to use a Text-Only editor like NotePad (PC) or TextEdit (Mac) to archive your information.**
105120

106-
If you use a "smart" editor, it may change lower-case letters to upper-case letters at the beginning of a line when you paste items into your archive file.
121+
If you use a "smart" editor, it may change little letters to capital letters at the beginning of a line when you paste items into your archive file.
107122

108123
If even one character is capitalized when it should not be, you will get errors.
109124

@@ -123,6 +138,7 @@ You don't need to know anything about the <code>Secrets</code> to do this. Come
123138
* There is a reference pattern for each SECRET: replace that with your SECRET or you can add your secret below the pattern to give yourself confidence you got the correct item
124139
4. In addition to the <code>Secrets</code>, this template has places for other pieces of information you may find handy to save in the same file
125140
5. At the very beginning is a place to indicate the last day you updated the file
141+
6. If you use Nightscout, you may also want the [Nightscout template](../nightscout/remote-config.md#save-your-important-nightscout-information){: target="_blank" }
126142

127143
``` { .bash .copy title="Template to use for Secrets" }
128144
MySecretsReferenceFile.txt
@@ -142,15 +158,17 @@ suggest you use your desired password tool to save the password for this account
142158
<your information here>
143159
suggest you use your desired password tool to save the password for this account
144160

145-
These are the Six Secrets in alphabetical order - each one shows the expected format.
146-
Delete each prototype as you gather your own secrets.
147-
The letter A indicates an alphanumeric character.
148-
Some may be lower case, some upper case and some numerals.
161+
There are Six Secrets and One Environment Variable:
162+
- the list below shows the expected format of each.
163+
You can replace each prototype with your secret as you gather them,
164+
- or put your secret below a prototype.
165+
The letter A indicates an alphanumeric character;
166+
- some may be small letter, some capital letters and some numerals.
149167
The FASTLANE_KEY may have additional characters included.
150-
For that one copy the entire key
151-
including -----BEGIN PRIVATE KEY-----
152-
through
153-
-----END PRIVATE KEY-----
168+
Be sure to copy the entire key including
169+
-----BEGIN PRIVATE KEY-----
170+
through
171+
-----END PRIVATE KEY-----
154172

155173
## SECRETS BELOW:
156174

@@ -166,7 +184,6 @@ FASTLANE_KEY_ID
166184
<looks like this>
167185
AAAAAAAAAA
168186

169-
170187
FASTLANE_KEY
171188
<looks like this>
172189
-----BEGIN PRIVATE KEY-----
@@ -184,13 +201,23 @@ MATCH_PASSWORD
184201
<looks like this>
185202
AnyThingYouWant-sameForEveryRepository
186203

204+
New addition, this environment variable:
205+
206+
ENABLE_NUKE_CERTS = true
207+
208+
With release of Loop 3.6.0:
209+
this variable is needed to automatically renew your certificates when they expire.
210+
187211
## Repository Names for my Fork:
188212

189-
https://github.com/my-github-username/LoopWorkspace
213+
https://github.com/my-github-username-or-org-name/LoopWorkspace
214+
190215

191216
Add additional apps here if you decide to build any
192217
```
193218
219+
220+
194221
## New Terms with <code>*GitHub* Browser Build</code>
195222
196223
The <code>*GitHub* Browser Build</code> may use new and unfamiliar **terms**.

docs/browser/other-apps.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,11 @@ The [Install on Phone](phone-install.md) walks you through the steps to install
408408
This section is optional. It is provided to assist:
409409

410410
* Users who are using *GitHub* for other reasons and want to segregate their DIY app building from their existing accounts
411-
* Mentors who want to do a lot of testing of many DIY apps to support people and get tired of entering the 6 <code>Secrets</code> repeatedly
412-
* Users who are comfortable with the *GitHub* web interface who want the convenience of entering the 6 <code>Secrets</code> just one time instead of entering them for each <code>repository</code> individually
411+
* Users who want the convenience of entering the 6 <code>Secrets</code> just one time instead of entering them for each <code>repository</code> individually
413412

414413
### Set up a Free *GitHub* Organization
415414

416-
Prerequisite: You need a personal *GitHub* account.
415+
Prerequisite: You need a personal *GitHub* account. If you do not already have a personal *GitHub* account, click on [New *GitHub* Account](secrets.md#new-github-account){: target="_blank" }.
417416

418417
In the instructions below, use your *GitHub* username instead of `my-name`.
419418

0 commit comments

Comments
 (0)