Skip to content

Commit f445d78

Browse files
authored
Merge pull request #502 from nightscout/sync-trio-dev
v0.5.0 Public Beta Rollout
2 parents 089c062 + b6fca3b commit f445d78

File tree

1,513 files changed

+426074
-80151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,513 files changed

+426074
-80151
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: "🆘 Individual troubleshooting help: Please go to the Discord Trio Server"
4-
url: https://discord.com/invite/FnwFEFUwXE
4+
url: https://discord.triodocs.org
55
about: Are you having an issue with your individual setup? Please first go to the Discord Trio Server and post there, with details of your setup (App version, pump, CGM, and CGM app) and the issue you are observing

.github/workflows/add_identifiers.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Validate
99
uses: ./.github/workflows/validate_secrets.yml
1010
secrets: inherit
11-
11+
1212
identifiers:
1313
name: Add Identifiers
1414
needs: validate
@@ -17,7 +17,7 @@ jobs:
1717
# Checks-out the repo
1818
- name: Checkout Repo
1919
uses: actions/checkout@v4
20-
20+
2121
# Patch Fastlane Match to not print tables
2222
- name: Patch Match Tables
2323
run: |
@@ -36,7 +36,7 @@ jobs:
3636
# Sync the GitHub runner clock with the Windows time server (workaround as suggested in https://github.com/actions/runner/issues/2996)
3737
- name: Sync clock
3838
run: sudo sntp -sS time.windows.com
39-
39+
4040
# Create or update identifiers for app
4141
- name: Fastlane Provision
4242
run: bundle exec fastlane identifiers

.github/workflows/add_to_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 8. DONT RUN Add bugs to bugs project
1+
name: zzz [DO NOT RUN] Add Bugs to Project 'Bugs'
22

33
on:
44
issues:
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# -----------------------------------------------------------------------------
2+
# Workflow: `auto_version_dev.yml`
3+
#
4+
# Description:
5+
# This GitHub Actions workflow automatically manages and increments the
6+
# `APP_DEV_VERSION` defined in `Config.xcconfig` on every push to `dev` branch.
7+
# This version is used for internal tracking and diagnostics (e.g. in
8+
# Crashlytics) and follows a 4-digit semantic versioning format:
9+
# `MAJOR.MINOR.PATCH.FEATURE`.
10+
#
11+
# Versioning Logic:
12+
# - Reads the base version from `APP_VERSION = x.y.z`
13+
# - Reads the last internal dev version from `APP_DEV_VERSION`
14+
#
15+
# Behavior:
16+
# - If `APP_DEV_VERSION` matches `APP_VERSION` (e.g. both are `0.5.0`),
17+
# it assumes the first dev push after a release and sets `APP_DEV_VERSION`
18+
# to `APP_VERSION.1` (e.g. `0.5.0.1`)
19+
# - If `APP_DEV_VERSION` is already in 4-digit form (e.g. `0.5.0.3`),
20+
# it increments the fourth digit (e.g. → `0.5.0.4`)
21+
#
22+
# Example Progression:
23+
# - Release sets `APP_VERSION = 0.5.0`, `APP_DEV_VERSION = 0.5.0`
24+
# - First push to `dev`: → `APP_DEV_VERSION = 0.5.0.1`
25+
# - Second push to `dev`: → `APP_DEV_VERSION = 0.5.0.2`
26+
# - ...
27+
#
28+
# The updated value is committed and pushed back to the `dev` branch.
29+
#
30+
# Prerequisites:
31+
# - `APP_VERSION` must be present in `Config.xcconfig` in the form `x.y.z`
32+
# - `APP_DEV_VERSION` must either match `APP_VERSION` or be `x.y.z.w`
33+
# - GitHub Actions must have write permission to push to `dev`
34+
# - This workflow only runs when the repository owner is `nightscout`
35+
# -----------------------------------------------------------------------------
36+
37+
name: zzz [DO NOT RUN] Bump APP_DEV_VERSION on dev push
38+
39+
on:
40+
push:
41+
branches:
42+
- dev
43+
44+
jobs:
45+
bump-dev-version:
46+
if: github.repository_owner == 'nightscout'
47+
runs-on: ubuntu-latest
48+
49+
steps:
50+
- name: Checkout repo
51+
uses: actions/checkout@v4
52+
53+
- name: Set up Git
54+
run: |
55+
git config --global user.name "github-actions[bot]"
56+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
57+
58+
- name: Bump APP_DEV_VERSION
59+
run: |
60+
FILE=Config.xcconfig
61+
62+
# Read current APP_VERSION
63+
BASE_VERSION=$(grep '^APP_VERSION' "$FILE" | cut -d '=' -f2 | xargs)
64+
65+
# Read existing APP_DEV_VERSION, if any
66+
DEV_LINE=$(grep '^APP_DEV_VERSION' "$FILE" || echo "")
67+
if [ -z "$DEV_LINE" ]; then
68+
CURRENT_DEV_VERSION="$BASE_VERSION"
69+
else
70+
CURRENT_DEV_VERSION=$(echo "$DEV_LINE" | cut -d '=' -f2 | xargs)
71+
fi
72+
73+
echo "APP_VERSION = $BASE_VERSION"
74+
echo "APP_DEV_VERSION = $CURRENT_DEV_VERSION"
75+
76+
# Decide next dev version
77+
if [ "$CURRENT_DEV_VERSION" = "$BASE_VERSION" ]; then
78+
# First post-release commit to dev → bump to .1
79+
NEW_DEV_VERSION="${BASE_VERSION}.1"
80+
if [ -z "$DEV_LINE" ]; then
81+
echo "APP_DEV_VERSION = $NEW_DEV_VERSION" >> "$FILE"
82+
else
83+
sed -i -E "s|^APP_DEV_VERSION *= *.*|APP_DEV_VERSION = $NEW_DEV_VERSION|" "$FILE"
84+
fi
85+
else
86+
# Already in .X form → bump last digit
87+
IFS='.' read -r MAJOR MINOR PATCH FEATURE <<< "$CURRENT_DEV_VERSION"
88+
FEATURE=$((FEATURE + 1))
89+
NEW_DEV_VERSION="$MAJOR.$MINOR.$PATCH.$FEATURE"
90+
sed -i -E "s|^APP_DEV_VERSION *= *.*|APP_DEV_VERSION = $NEW_DEV_VERSION|" "$FILE"
91+
fi
92+
93+
echo "NEW APP_DEV_VERSION = $NEW_DEV_VERSION"
94+
echo "NEW_DEV_VERSION=$NEW_DEV_VERSION" >> $GITHUB_ENV
95+
96+
- name: Commit and push updated dev version
97+
run: |
98+
git add Config.xcconfig
99+
git commit -m "CI: Bump APP_DEV_VERSION to $NEW_DEV_VERSION"
100+
git push

.github/workflows/build_trio.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- cron: "0 8 * * 3" # Checks for updates at 08:00 UTC every Wednesday
1111
- cron: "0 6 1 * *" # Builds the app on the 1st of every month at 06:00 UTC
1212

13-
env:
13+
env:
1414
UPSTREAM_REPO: nightscout/Trio
1515
UPSTREAM_BRANCH: ${{ github.ref_name }} # branch on upstream repository to sync from (replace with specific branch name if needed)
1616
TARGET_BRANCH: ${{ github.ref_name }} # target branch on fork to be kept in sync, and target branch on upstream to be kept alive (replace with specific branch name if needed)
@@ -20,10 +20,10 @@ env:
2020
jobs:
2121
# Checks if Distribution certificate is present and valid, optionally nukes and
2222
# creates new certs if the repository variable ENABLE_NUKE_CERTS == 'true'
23-
check_certs:
24-
name: Check certificates
25-
uses: ./.github/workflows/create_certs.yml
26-
secrets: inherit
23+
check_certs:
24+
name: Check certificates
25+
uses: ./.github/workflows/create_certs.yml
26+
secrets: inherit
2727

2828
# Checks if GH_PAT holds workflow permissions
2929
# Checks for existence of alive branch; if non-existent creates it
@@ -185,7 +185,7 @@ jobs:
185185
echo "Synchronizing your fork of <code>Trio</code> with the upstream repository <code>nightscout/Trio</code> will be skipped." >> $GITHUB_STEP_SUMMARY
186186
echo "If you want to enable automatic builds and updates for your Trio, please follow the instructions \
187187
under the following path <code>Trio/fastlane/testflight.md</code>." >> $GITHUB_STEP_SUMMARY
188-
188+
189189
# Builds Trio
190190
build:
191191
name: Build

.github/workflows/create_certs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
# Checks-out the repo
3030
- name: Checkout Repo
3131
uses: actions/checkout@v4
32-
32+
3333
# Patch Fastlane Match to not print tables
3434
- name: Patch Match Tables
3535
run: |
@@ -60,7 +60,7 @@ jobs:
6060
run: |
6161
CERT_STATUS_FILE="${{ github.workspace }}/fastlane/new_certificate_needed.txt"
6262
ENABLE_NUKE_CERTS=${{ vars.ENABLE_NUKE_CERTS }}
63-
63+
6464
if [ -f "$CERT_STATUS_FILE" ]; then
6565
CERT_STATUS=$(cat "$CERT_STATUS_FILE" | tr -d '\n' | tr -d '\r') # Read file content and strip newlines
6666
echo "new_certificate_needed: $CERT_STATUS"

.github/workflows/stale_issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 8. DONT RUN close inactive issues
1+
name: zzz [DO NOT RUN] Close Inactive Issues
22
on:
33
schedule:
44
- cron: "30 1 * * *"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ fastlane/screenshots
7979
fastlane/test_output
8080
fastlane/FastlaneRunner
8181

82-
ConfigOverride.xcconfig
82+
ConfigOverride.xcconfig

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@
3838
path = TidepoolService
3939
url = https://github.com/loopandlearn/TidepoolService.git
4040
branch = trio
41+
[submodule "DanaKit"]
42+
path = DanaKit
43+
url = https://github.com/loopandlearn/DanaKit

CGMBLEKit

0 commit comments

Comments
 (0)