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

Add version check to dialogCheck, Split out install to new function #67

Merged

Conversation

drtaru
Copy link
Contributor

@drtaru drtaru commented May 28, 2023

I added a minimum version check to the dialogCheck function and split out the SwiftDialog install portion to it's own function as it is now used twice.

Log output on a machine with an outdated version "2.1.0.4148" of SwiftDialog

2023-05-28 19:21:27 - PRE-FLIGHT CHECK: # # # SETUP YOUR MAC VERBOSE DEBUG MODE: Line No. 414 # # #
2023-05-28 19:21:28 - PRE-FLIGHT CHECK: swiftDialog version 2.1.0.4148 found but swiftDialog 2.2 or newer is required; updating...
2023-05-28 19:21:28 - PRE-FLIGHT CHECK: Installing SwiftDialog...
installer: Package name is
installer: Upgrading at base path /
installer: The upgrade was successful.
2023-05-28 19:21:32 - PRE-FLIGHT CHECK: swiftDialog version 2.2.0.4535 installed; proceeding...
2023-05-28 19:21:32 - PRE-FLIGHT CHECK: Complete

Log output from a machine that does not have SwiftDialog installed.

2023-05-28 19:30:03 - PRE-FLIGHT CHECK: # # # SETUP YOUR MAC VERBOSE DEBUG MODE: Line No. 414 # # #
2023-05-28 19:30:03 - PRE-FLIGHT CHECK: swiftDialog not found. Installing...
2023-05-28 19:30:03 - PRE-FLIGHT CHECK: Installing SwiftDialog...
installer: Package name is
installer: Installing at base path /
installer: The install was successful.
2023-05-28 19:30:08 - PRE-FLIGHT CHECK: swiftDialog version 2.2.0.4535 installed; proceeding...
2023-05-28 19:30:08 - PRE-FLIGHT CHECK: Complete

@drtaru drtaru changed the base branch from main to development May 28, 2023 23:31
@drtaru drtaru changed the base branch from development to main May 28, 2023 23:32
@humanendpoint
Copy link

could also do something like dialogVersion=$(echo $dialogURL | sed 's/[^\-]*-//' | sed 's/\.[^.]*$//') to avoid any version hard coding as well.

@drtaru
Copy link
Contributor Author

drtaru commented May 29, 2023

The thought here is the hard lower limit for 1.11 is 2.2

This mostly only applies to re-runs by admins as the script running on enrollment should always detect no dialog and download it fresh.

@humanendpoint
Copy link

fair enough, just thought I'd chime in :)

@dan-snelson dan-snelson changed the base branch from main to 1.12.0 June 5, 2023 10:06
@dan-snelson dan-snelson merged commit cf5e698 into setup-your-mac:1.12.0 Jun 5, 2023
@drtaru drtaru deleted the 1.11.0-minimumDialogVersion branch August 23, 2023 20:14
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