nightscout / Trio

MIT License
64 stars 259 forks source link

Rename FreeAPS X scheme to Open-iAPS #127

Closed bjornoleh closed 3 months ago

marionbarker commented 4 months ago

Tested using the build script:

export SCRIPT_BRANCH=oi && /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/loopandlearn/lnl-scripts/$SCRIPT_BRANCH/BuildOpen-iAPS.sh)" - "rename_scheme"

Fresh download of clone from the rename-scheme branch. The scheme is renamed, but it is not selected as the default scheme in Xcode.

open-iaps-rename-scheme-freshdownload

marionbarker commented 4 months ago

In my local clone, I made the following change:

 1617  git switch -c play-scheme
 1619  git mv FreeAPS.xcworkspace Open-iAPS.xcworkspace
 1624  git commit -am "test to see if this works for default scheme"
 1626  git push --set-upstream mdb play-scheme

Translation for those not familiar with CLI: I created a new branch from the rename_scheme branch; I changed the name of the FreeAPS.xcworkspace folder and committed it to the new branch and then pushed that new branch to the marionbarker fork of Open-iAPS.

Then I did a fresh clone:

 1043  git clone --branch=play-scheme  --recurse-submodules https://github.com/marionbarker/Open-iAPS.git
 1044  cd Open-iAPS
 1045  xed .

And this is the initial Xcode view: open-iaps-play-scheme-freshdownloag

At this point, all I needed to do was press the Play button and the fresh download built on the phone.

marionbarker commented 4 months ago

One more note - in the local clone, I'm getting all sorts of weird behavior switching between branches. I think this is another case where you will need a separate folder for this branch. The fresh download behaves nicely. The clone where I switch between alpha and this branch opens 2 Xcode windows and does not pick the Open-iAPS scheme automatically until you select it once. But the 2 Xcode windows seems to persist.

marionbarker commented 4 months ago

The 2 Xcode windows is resolved by:

bjornoleh commented 3 months ago

I can confirm that renaming the workspace to Open-iAPS fixes the default scheme issue, so I added your changes to this PR.

marionbarker commented 3 months ago

Code review - looks good - except I did not know that a hyphen in a lane name would be treated as a delimiter. See Test Part 2 and Part 3 below. Need to accept PR 134 into this branch, then this PR will be ready to merge.

Test Part 1: Mac Build: Fresh download of branch rename-scheme

Test Part 2: Browser Build

Test Part 3: Modify Code and Test Browser Build

marionbarker commented 3 months ago

Test 4: Create alive branch for Browser Build - Success

marionbarker commented 3 months ago

There was an error in the LoopWorkspace version of the build file where a GITHUB_TOKEN was in a place where it was not defined and needed to be changed to GH_PAT.

The change that matters is already in place with this code - see this line:

Note there is a second location where that same line is found (line 57), but I don't believe the env variable is used in this section:

But to make this match LoopWorkspace build yml, I created an PR 135 to update that line.

bjornoleh commented 3 months ago

Merging after review by @marionbarker and @dnzxy