Skip to content

Commit

Permalink
fix mist compatibility downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
grahampugh committed Jun 7, 2023
1 parent 6e70464 commit f1d1799
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

No date

## [29.2]

No date

- Fix downloads from mist only selecting compatible builds.
- Version bump to use mist-cli v1.12, which includes a less verbose output for the download logs (one register per percentage download instead of one register per second).

## [29.1]

27.02.2023
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CURDIR := $(shell pwd)
USER := $(shell whoami)
MISTCLI_URL := "https://github.com/ninxsoft/mist-cli/releases/download/v1.11/mist-cli.1.11.pkg"
MISTCLI_URL := "https://github.com/ninxsoft/mist-cli/releases/download/v1.12/mist-cli.1.12.pkg"
SWIFTDIALOG_URL := "https://github.com/bartreardon/swiftDialog/releases/download/v2.1.0/dialog-2.1.0-4148.pkg"
MUNKIPKG := /usr/local/bin/munkipkg
PKG_ROOT := $(CURDIR)/pkg/erase-install/payload
Expand Down
14 changes: 11 additions & 3 deletions erase-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ mist_export_file="$workdir/mist-list.json"

# URL for downloading dialog (with tag version)
# This ensures a compatible dialog is used if not using the package installer
mist_download_url="https://github.com/ninxsoft/mist-cli/releases/download/v1.10/mist-cli.1.10.pkg"
mist_download_url="https://github.com/ninxsoft/mist-cli/releases/download/v1.12/mist-cli.1.12.pkg"

# swiftDialog tool
dialog_app="/Library/Application Support/Dialog/Dialog.app"
Expand Down Expand Up @@ -956,6 +956,7 @@ find_extra_packages() {
# -----------------------------------------------------------------------------
# Return code 143 and finish the script when TERMinated or INTerrupted
# -----------------------------------------------------------------------------
# shellcheck disable=SC2317
terminate() {
echo " [terminate] Script was interrupted (last exit code was $?)"
exit 143
Expand All @@ -964,6 +965,7 @@ terminate() {
# -----------------------------------------------------------------------------
# Things to carry out when the script exits
# -----------------------------------------------------------------------------
# shellcheck disable=SC2317
finish() {
local exit_code=${1:-$?}
# if we promoted the user then we should demote it again
Expand All @@ -990,7 +992,7 @@ finish() {

# set final exit code and quit, but do not call finish() again
writelog "[finish] Script exit code: $exit_code"
(exit $exit_code)
(exit "$exit_code")
}

# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -1249,7 +1251,7 @@ get_user_details() {

if [[ $enabled_users != "" && $user_is_volume_owner -eq 0 ]]; then
writelog "[get_user_details] $account_shortname is not a Volume Owner"
user_not_volume_owner=1
user_not_volume_owner
if [[ ($max_password_attempts != "infinite" && $password_attempts -ge $max_password_attempts) || $silent ]]; then
password_is_invalid
exit 1
Expand Down Expand Up @@ -1429,6 +1431,7 @@ overwrite_existing_installer() {
# -----------------------------------------------------------------------------
# Things to do after startosinstall has finished preparing
# -----------------------------------------------------------------------------
# shellcheck disable=SC2317
post_prep_work() {
# set dialog progress for rebootdelay if set
if [[ "$rebootdelay" -gt 10 && ! $silent && $fs != "yes" ]]; then
Expand Down Expand Up @@ -1690,6 +1693,10 @@ run_mist() {
mist_args+=("$installer_directory")
fi

if [[ "$skip_validation" != "yes" ]]; then
mist_args+=("--compatible")
fi

# run in no-ansi mode which is less pretty but better for our logs
mist_args+=("--no-ansi")

Expand Down Expand Up @@ -2305,6 +2312,7 @@ password_is_invalid() {
# Open dialog to show that the user is not a Volume Owner.
# This is required on Apple Silicon Mac
# -----------------------------------------------------------------------------
# shellcheck disable=SC2317
user_not_volume_owner() {
# required for Silicon Macs
writelog "[user_is_invalid] ERROR - user is not a Volume Owner."
Expand Down
2 changes: 1 addition & 1 deletion pkg/erase-install/build-info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<key>suppress_bundle_relocation</key>
<true/>
<key>version</key>
<string>29.1</string>
<string>29.2</string>
</dict>
</plist>

0 comments on commit f1d1799

Please sign in to comment.