Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename FreeAPS X scheme to Open-iAPS #127

Merged
merged 8 commits into from
Apr 29, 2024
Merged

Rename FreeAPS X scheme to Open-iAPS #127

merged 8 commits into from
Apr 29, 2024

Conversation

bjornoleh
Copy link
Contributor

No description provided.

@marionbarker
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

The 2 Xcode windows is resolved by:

  • switch to play-scheme branch:

    • open Xcode, quit Xcode (or close all Xcode windows - ignore warnings) and then delete the FreeAPS.xcworkspace/ folder
    • rm -rf FreeAPS.xcworkspace
    • open Xcode (with xed .) and Open-iAPS is default scheme
  • switch to alpha branch:

    • open Xcode, quit Xcode (or close all Xcode windows - ignore warnings) and then delete the Open-iAPS.xcworkspace/ folder
    • rm -rf Open-iAPS.xcworkspace
    • open Xcode (xed .), select FreeAPS X as scheme and build

@bjornoleh
Copy link
Contributor Author

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

And updated the fastlane build action lane in build_Open-iAPS.yml

Co-authored-by: bjornoleh <bjorn.haugsgjerd@gmail.com>
@marionbarker
Copy link
Contributor

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

  • fresh clone
  • opens to correct scheme in Xcode (Open-iAPS)
  • wait for packages to finish downloading
  • builds correctly by tapping the build button in Xcode.

Test Part 2: Browser Build

  • this failed for 2 reasons:
    1. The Gemfile.lock modification is required to upgrade Fastlane to 2.220.0 in order to test browser build.
    2. The lane names are limited to letters and underscore. Any non-underscore character is treated as a delimiter. Using a lane name of build_Open-iAPS implied it was looking for iAPS as an input parameter

Test Part 3: Modify Code and Test Browser Build

  • I created a new branch in my repository called fix-lane-upgrade-Fastlane that repaired the two issues listed above
  • This was tested successfully to complete the Browser Build
  • I created a PR to the rename-scheme branch so you can merge that and then merge 127

@marionbarker
Copy link
Contributor

Test 4: Create alive branch for Browser Build - Success

  • delete the alive branch
  • run Action: Build Open-iAPS using latest commits to rename_scheme
  • in the first 2 minutes, the alive branch was created
  • cancel the action to preserve minutes

@marionbarker
Copy link
Contributor

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
Copy link
Contributor Author

Merging after review by @marionbarker and @dnzxy

@bjornoleh bjornoleh merged commit 99effeb into alpha Apr 29, 2024
@bjornoleh bjornoleh deleted the rename_scheme branch April 29, 2024 09:00
This was referenced May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants