Skip to content

Commit 43cdd14

Browse files
authored
Merge pull request #41 from LoopKit/dev
Loop 3.2 Release
2 parents d70602d + ab17b94 commit 43cdd14

33 files changed

+407
-237
lines changed

.circleci/config.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ jobs:
99
command: git submodule update --init --recursive --depth 1
1010
- run:
1111
name: Build Loop
12-
command: set -o pipefail && time xcodebuild -workspace Loop.xcworkspace -scheme 'Loop (Workspace)' -destination 'platform=iOS Simulator,name=iPhone 13,OS=15.5' build | xcpretty
13-
- run:
14-
name: Build Learn
15-
command: set -o pipefail && time xcodebuild -workspace Loop.xcworkspace -scheme 'Learn (Workspace)' -destination 'platform=iOS Simulator,name=iPhone 13,OS=15.5' build | xcpretty
12+
command: set -o pipefail && time xcodebuild -workspace LoopWorkspace.xcworkspace -scheme 'LoopWorkspace' -destination 'platform=iOS Simulator,name=iPhone 13,OS=15.5' build | xcpretty
1613
- run:
1714
name: Run Tests
18-
command: set -o pipefail && time xcodebuild -workspace Loop.xcworkspace -scheme 'Loop (Workspace)' -destination 'platform=iOS Simulator,name=iPhone 13,OS=15.5' test | xcpretty
15+
command: set -o pipefail && time xcodebuild -workspace LoopWorkspace.xcworkspace -scheme 'LoopWorkspace' -destination 'platform=iOS Simulator,name=iPhone 13,OS=15.5' test | xcpretty
1916

.github/workflows/add_identifiers.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
name: Add Identifiers
1+
name: 2. Add Identifiers
2+
run-name: Add Identifiers
23
on:
34
workflow_dispatch:
45

56
jobs:
7+
secrets:
8+
uses: ./.github/workflows/validate_secrets.yml
9+
secrets: inherit
10+
611
identifiers:
12+
needs: secrets
713
runs-on: macos-12
814
steps:
915
# Uncomment to manually select latest Xcode if needed

.github/workflows/build_loop.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1-
name: Build Loop
1+
name: 4. Build Loop
2+
run-name: Build Loop
23
on:
34
workflow_dispatch:
5+
6+
## Remove the "#" sign from the beginning of the line below to get automated builds on push (code changes in your repository)
7+
#push:
8+
9+
## Remove the "#" sign from the beginning of the two lines below to get automated builds every two months
10+
#schedule:
11+
#- cron: '0 17 1 */2 *' # Runs at 17:00 UTC on the 1st in Jan, Mar, May, Jul, Sep and Nov.
412

513
jobs:
14+
secrets:
15+
uses: ./.github/workflows/validate_secrets.yml
16+
secrets: inherit
17+
618
build:
19+
needs: secrets
720
runs-on: macos-12
821
steps:
922
# Uncomment to manually select latest Xcode if needed

.github/workflows/create_certs.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
name: Create Certificates
1+
name: 3. Create Certificates
2+
run-name: Create Certificates
23
on:
34
workflow_dispatch:
45

56
jobs:
7+
secrets:
8+
uses: ./.github/workflows/validate_secrets.yml
9+
secrets: inherit
10+
611
certificates:
12+
needs: secrets
713
runs-on: macos-12
814
steps:
915
# Uncomment to manually select latest Xcode if needed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: 1. Validate Secrets
2+
run-name: Validate Secrets
3+
on: [workflow_call, workflow_dispatch]
4+
5+
jobs:
6+
validate:
7+
runs-on: macos-12
8+
steps:
9+
# Checks-out the repo
10+
- name: Checkout Repo
11+
uses: actions/checkout@v3
12+
13+
# Validates the repo secrets
14+
- name: Validate Secrets
15+
run: |
16+
# Validate Secrets
17+
echo Validating Repository Secrets...
18+
19+
# Validate TEAMID
20+
if [ -z "$TEAMID" ]; then
21+
failed=true
22+
echo "::error::TEAMID secret is unset or empty. Set it and try again."
23+
elif [ ${#TEAMID} -ne 10 ]; then
24+
failed=true
25+
echo "::error::TEAMID secret is set but has wrong length. Verify that it is set correctly and try again."
26+
fi
27+
28+
# Validate GH_PAT
29+
if [ -z "$GH_PAT" ]; then
30+
failed=true
31+
echo "::error::GH_PAT secret is unset or empty. Set it and try again."
32+
elif [ "$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository_owner }}/Match-Secrets | jq --raw-output '.permissions.push')" != "true" ]; then
33+
failed=true
34+
echo "::error::GH_PAT secret is set but invalid or lacking appropriate privileges on the ${{ github.repository_owner }}/Match-Secrets repository. Verify that it is set correctly and try again."
35+
fi
36+
37+
# Validate FASTLANE_ISSUER_ID, FASTLANE_KEY_ID, and FASTLANE_KEY
38+
if [ -z "$FASTLANE_ISSUER_ID" ] || [ -z "$FASTLANE_KEY_ID" ] || [ -z "$FASTLANE_KEY" ]; then
39+
failed=true
40+
[ -z "$FASTLANE_ISSUER_ID" ] && echo "::error::The FASTLANE_ISSUER_ID secret is unset or empty. Set it and try again."
41+
[ -z "$FASTLANE_KEY_ID" ] && echo "::error::The FASTLANE_KEY_ID secret is unset or empty. Set it and try again."
42+
[ -z "$FASTLANE_KEY" ] && echo "::error::The FASTLANE_KEY secret is unset or empty. Set it and try again."
43+
elif ! echo "$FASTLANE_KEY" | openssl pkcs8 -nocrypt >/dev/null; then
44+
failed=true
45+
echo "::error::The FASTLANE_KEY secret is set but invalid. Verify that it is set correctly and try again."
46+
elif ! fastlane validate_secrets; then
47+
failed=true
48+
echo "::error::Unable to create a valid authorization token for the App Store Connect API.\
49+
Verify that the FASTLANE_ISSUER_ID, FASTLANE_KEY_ID, and FASTLANE_KEY secrets are set correctly and try again."
50+
fi
51+
52+
# Validate MATCH_PASSWORD
53+
if [ -z "$MATCH_PASSWORD" ]; then
54+
failed=true
55+
echo "::error::The MATCH_PASSWORD secret is unset or empty. Set it and try again."
56+
fi
57+
58+
# Exit unsuccessfully if secret validation failed.
59+
if [ $failed ]; then
60+
exit 2
61+
fi
62+
shell: bash
63+
env:
64+
TEAMID: ${{ secrets.TEAMID }}
65+
GH_PAT: ${{ secrets.GH_PAT }}
66+
FASTLANE_ISSUER_ID: ${{ secrets.FASTLANE_ISSUER_ID }}
67+
FASTLANE_KEY_ID: ${{ secrets.FASTLANE_KEY_ID }}
68+
FASTLANE_KEY: ${{ secrets.FASTLANE_KEY }}
69+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
70+
GH_TOKEN: ${{ secrets.GH_PAT }}

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@
4646
[submodule "G7SensorKit"]
4747
path = G7SensorKit
4848
url = https://github.com/LoopKit/G7SensorKit.git
49+
[submodule "TidepoolService"]
50+
path = TidepoolService
51+
url = https://github.com/LoopKit/TidepoolService.git
52+
[submodule "TidepoolKit"]
53+
path = TidepoolKit
54+
url = https://github.com/LoopKit/TidepoolKit.git

AmplitudeService

Submodule AmplitudeService updated 40 files

CGMBLEKit

Submodule CGMBLEKit updated 151 files

G7SensorKit

Submodule G7SensorKit updated 47 files

LogglyService

Submodule LogglyService updated 42 files

0 commit comments

Comments
 (0)