Compare commits

..
Author SHA1 Message Date
Sparkle-Bot 4222fd6179 Update Package.swift and Sparkle.podspec for version 1.27.1-rc.2 2021-11-08 07:16:11 +00:00
Zorg 16c2f9b78b Fix create-draft-release not including pre-release suffix 2021-11-07 23:10:01 -08:00
Sparkle-Bot 26d30d7c2b Update Package.swift and Sparkle.podspec for version 1.27.1 2021-11-08 06:53:54 +00:00
Zorg b3b5f5f246 Update 1.27.1 Changelog 2021-11-07 20:12:23 -08:00
Zorg a49d83dc22 Prevent potential rapid update checks from sleep/wake events (#2000) 2021-11-07 17:16:09 -08:00
Zorg 08932966b2 Disable hide on deactivate for update window (1.x) (#2008)
This is a backport of #1804 to 1.x
2021-11-06 15:43:03 -07:00
Zorg d80ad46c4f Whitelist about:srcdoc as a safe web URL (#2007)
The document I tested (after enabling javascript) was:

<description>
          <![CDATA[
              <p>Hello</p>
              <script>
              var iframe = document.createElement("iframe");
              iframe.srcdoc = `<!DOCTYPE html><p>Hello World!</p>`;
              document.body.appendChild(iframe);
              </script>
          ]]>
</description>
2021-11-06 14:52:25 -07:00
Zorg 4a00b97592 Add project version inputs to create-draft-release workflow (1.x) (#1999) 2021-10-30 22:55:50 -07:00
14 changed files with 133 additions and 49 deletions

No files matched your search

+35 -10
View File
@@ -5,7 +5,22 @@ env:
DEVELOPER_DIR: "/Applications/Xcode_13.1.app/Contents/Developer"
on:
workflow_dispatch
workflow_dispatch:
inputs:
marketingVersion:
description: "Marketing Version"
required: true
default: ""
prereleaseSuffix:
description: "Pre-release Suffix"
required: false
default: ""
buildVersion:
description: "Product Build"
required: true
default: ""
concurrency:
group: publish-release-${{ github.ref }}
@@ -27,16 +42,26 @@ jobs:
- name: "Extract latest changes from CHANGELOG"
run: |
./Configurations/generate_latest_changes.py > latest-changes.txt
- name: "Extract version information from project"
- name: "Overwrite project versions in project"
run: |
MARKETING_VERSION=$(xcrun xcodebuild -showBuildSettings -project Sparkle.xcodeproj | grep -m 1 '^[[:space:]]*MARKETING_VERSION' | sed -E 's/.+=[[:space:]]+(.*)$/\1/')
echo "MARKETING_VERSION=${MARKETING_VERSION}" >> $GITHUB_ENV
IFS='.' read major minor patch <<< "${{ github.event.inputs.marketingVersion }}"
sed -E -i '' "s/SPARKLE_VERSION_MAJOR =.+/SPARKLE_VERSION_MAJOR = $major/g" ./Configurations/ConfigCommon.xcconfig
sed -E -i '' "s/SPARKLE_VERSION_MINOR =.+/SPARKLE_VERSION_MINOR = $minor/g" ./Configurations/ConfigCommon.xcconfig
sed -E -i '' "s/SPARKLE_VERSION_PATCH =.+/SPARKLE_VERSION_PATCH = $patch/g" ./Configurations/ConfigCommon.xcconfig
if [[ ! -z "${{ github.event.inputs.prereleaseSuffix }}" ]]; then
sed -E -i '' "s/SPARKLE_VERSION_SUFFIX =.*/SPARKLE_VERSION_SUFFIX = ${{ github.event.inputs.prereleaseSuffix }}/g" ./Configurations/ConfigCommon.xcconfig
else
sed -E -i '' "s/SPARKLE_VERSION_SUFFIX =.*/SPARKLE_VERSION_SUFFIX =/g" ./Configurations/ConfigCommon.xcconfig
fi
sed -E -i '' "s/CURRENT_PROJECT_VERSION =.+/CURRENT_PROJECT_VERSION = ${{ github.event.inputs.buildVersion }}/g" ./Configurations/ConfigCommon.xcconfig
git add ./Configurations/ConfigCommon.xcconfig
- name: "Determine if this is a pre-release version"
run: |
SPARKLE_VERSION_SUFFIX=$(xcrun xcodebuild -showBuildSettings -project Sparkle.xcodeproj | grep -m 1 '^[[:space:]]*SPARKLE_VERSION_SUFFIX' | sed -E 's/.+=[[:space:]]+(.*)$/\1/')
if [[ ! -z "$SPARKLE_VERSION_SUFFIX" ]]; then
if [[ ! -z "${{ github.event.inputs.prereleaseSuffix }}" ]]; then
echo "PRERELEASE_VERSION=true" >> $GITHUB_ENV
else
echo "PRERELEASE_VERSION=false" >> $GITHUB_ENV
@@ -46,7 +71,7 @@ jobs:
run: |
git config user.name Sparkle-Bot
git config user.email sparkle.project.bot@gmail.com
git tag "${{ env.MARKETING_VERSION }}"
git tag "${{ github.event.inputs.marketingVersion }}${{ github.event.inputs.prereleaseSuffix }}"
- name: "Build release distribution"
run: make release
@@ -65,8 +90,8 @@ jobs:
with:
draft: true
prerelease: ${{ env.PRERELEASE_VERSION }}
name: "Sparkle ${{ env.MARKETING_VERSION }}"
tag_name: ${{ env.MARKETING_VERSION }}
name: "Sparkle ${{ github.event.inputs.marketingVersion }}${{ github.event.inputs.prereleaseSuffix }}"
tag_name: "${{ github.event.inputs.marketingVersion }}${{ github.event.inputs.prereleaseSuffix }}"
fail_on_unmatched_files: true
token: ${{ secrets.BOT_PERSONAL_ACCESS_TOKEN }}
body_path: latest-changes.txt
+3
View File
@@ -4,6 +4,9 @@
* Fix to prevent Sparkle manipulating the host app's high level WebView defaults from #1961 (affecting only macOS versions before 10.11 in 1.x branch) (Daniel Jalkut)
* Add safer handling of applying binary delta files from #1990 (Zorg)
* Don't use current date unless necessary when scheduling next update to be more resilient against rapid polling from #1991 (Zorg)
* Prevent potential rapid update checks from sleep/wake events using a minimum monotonic delay from #2000 (Zorg)
* Whitelist about:srcdoc as a safe web URL from #1938, #2007 (Louis Pontoise, Zorg)
* Backport not hiding update window on deactivation from #2008 (Zorg)
# 1.27.0
+4 -2
View File
@@ -16,14 +16,16 @@ SPARKLE_AUTOMATED_DOWNGRADES = 0
SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0
// If you change any of these version details, you must increase CURRENT_PROJECT_VERSION
// These variables must have a space after the '=' too
SPARKLE_VERSION_MAJOR = 1
SPARKLE_VERSION_MINOR = 27
SPARKLE_VERSION_PATCH = 1
// This should be in SemVer format or empty, ie. "-rc.1"
SPARKLE_VERSION_SUFFIX = -rc.1
// These variables must have a space after the '=' too
SPARKLE_VERSION_SUFFIX = -rc.2
// This is now a monotonically increasing ID number, even across prereleases, but let's keep this below 2.0
CURRENT_PROJECT_VERSION = 1.103
CURRENT_PROJECT_VERSION = 1.105
MARKETING_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)$(SPARKLE_VERSION_SUFFIX)
+3 -3
View File
@@ -2,10 +2,10 @@
import PackageDescription
// Version is technically not required here, SPM doesn't check
let version = "1.27.1-rc.1"
let version = "1.27.1-rc.2"
// Tag is required to point towards the right asset. SPM requires the tag to follow semantic versioning to be able to resolve it.
let tag = "1.27.1-rc.1"
let checksum = "29ea21aff129265413ca48785eacd4823cea89670299675069d36c41fd0a33e9"
let tag = "1.27.1-rc.2"
let checksum = "bad8b1adf12f0d1ab7ad093ca74727d6fafc2a3b2066e67e92bec3938ef0e0c1"
let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(tag)/Sparkle-for-Swift-Package-Manager.zip"
let package = Package(
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Sparkle"
s.version = "1.27.1-rc.1"
s.version = "1.27.1-rc.2"
s.summary = "A software update framework for macOS"
s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers."
s.homepage = "https://sparkle-project.org"
+3 -3
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="19455" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19455"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -20,7 +20,7 @@
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window identifier="SUUpdateAlert" title="Software Update" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hidesOnDeactivate="YES" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="SUUpdateAlert" animationBehavior="default" id="5" userLabel="Update Alert (release notes)">
<window identifier="SUUpdateAlert" title="Software Update" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="SUUpdateAlert" animationBehavior="default" id="5" userLabel="Update Alert (release notes)">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowCollectionBehavior key="collectionBehavior" fullScreenAuxiliary="YES"/>
<windowPositionMask key="initialPositionMask" topStrut="YES" bottomStrut="YES"/>
-1
View File
@@ -61,7 +61,6 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
// update prompt to behave like a normal window. Otherwise if the window were hidden
// there may be no way for the application to be activated to make it visible again.
if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) {
[[self.alert window] setHidesOnDeactivate:NO];
[NSApp activateIgnoringOtherApps:YES];
}
+1
View File
@@ -18,6 +18,7 @@
extern const NSTimeInterval SUMinimumUpdateCheckInterval;
extern const NSTimeInterval SUDefaultUpdateCheckInterval;
extern const NSTimeInterval SUMinimumMonotonicUpdateCheckInterval;
extern NSString *const SUBundleIdentifier;
+1
View File
@@ -18,6 +18,7 @@
// Define some minimum intervals to avoid DoS-like checking attacks
const NSTimeInterval SUMinimumUpdateCheckInterval = DEBUG ? 60 : (60 * 60);
const NSTimeInterval SUDefaultUpdateCheckInterval = DEBUG ? 60 : (60 * 60 * 24);
const NSTimeInterval SUMinimumMonotonicUpdateCheckInterval = DEBUG ? 30 : (60 * 5);
NSString *const SUBundleIdentifier = @SPARKLE_BUNDLE_IDENTIFIER;
+3 -3
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="19455" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19455"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -55,7 +55,7 @@
</connections>
</progressIndicator>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="12">
<rect key="frame" x="272" y="12" width="114" height="32"/>
<rect key="frame" x="272" y="12" width="113" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES"/>
<buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="55">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-1
View File
@@ -97,7 +97,6 @@
// update prompt to behave like a normal window. Otherwise if the window were hidden
// there may be no way for the application to be activated to make it visible again.
if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) {
[[self.updateAlert window] setHidesOnDeactivate:NO];
[NSApp activateIgnoringOtherApps:YES];
}
+77 -23
View File
@@ -41,11 +41,12 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
@property (assign) BOOL shouldRescheduleOnWake;
@property (strong) NSBundle *sparkleBundle;
@property (nonatomic) BOOL loggedNoSecureKeyWarning;
@property (nonatomic) NSTimeInterval lastMonotonicUpdateCheckTime;
- (instancetype)initForBundle:(NSBundle *)bundle;
- (void)startUpdateCycle;
- (void)checkForUpdatesWithDriver:(SUUpdateDriver *)updateDriver;
- (void)scheduleNextUpdateCheckUsingCurrentTime:(BOOL)usingCurrentTime;
- (void)scheduleNextUpdateCheckUsingCurrentDate:(BOOL)usingCurrentDate;
- (void)registerAsObserver;
- (void)unregisterAsObserver;
- (void)updateDriverDidFinish:(NSNotification *)note;
@@ -71,6 +72,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
@synthesize decryptionPassword;
@synthesize updateLastCheckedDate;
@synthesize loggedNoSecureKeyWarning = _loggedNoSecureKeyWarning;
@synthesize lastMonotonicUpdateCheckTime = _lastMonotonicUpdateCheckTime;
static NSMutableDictionary *sharedUpdaters = nil;
static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaultsObservationContext";
@@ -255,7 +257,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
// We start the update checks and register as observer for changes after the prompt finishes
} else {
// We check if the user's said they want updates, or they haven't said anything, and the default is set to checking.
[self scheduleNextUpdateCheckUsingCurrentTime:YES];
[self scheduleNextUpdateCheckUsingCurrentDate:YES];
}
}
@@ -271,7 +273,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
{
self.driver = nil;
[self updateLastUpdateCheckDate];
[self scheduleNextUpdateCheckUsingCurrentTime:NO];
[self scheduleNextUpdateCheckUsingCurrentDate:NO];
}
}
@@ -285,15 +287,25 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
return [self updateLastCheckedDate];
}
- (NSTimeInterval)currentMonotonicTimeInterval
{
// This is monotonic system time while the system is not asleep
return [[NSProcessInfo processInfo] systemUptime];
}
- (void)updateLastUpdateCheckDate
{
[self willChangeValueForKey:@"lastUpdateCheckDate"];
[self setUpdateLastCheckedDate:[NSDate date]];
[self.host setObject:[self updateLastCheckedDate] forUserDefaultsKey:SULastCheckTimeKey];
self.lastMonotonicUpdateCheckTime = [self currentMonotonicTimeInterval];
[self didChangeValueForKey:@"lastUpdateCheckDate"];
}
- (void)scheduleNextUpdateCheckUsingCurrentTime:(BOOL)usingCurrentTime
- (void)scheduleNextUpdateCheckUsingCurrentDate:(BOOL)usingCurrentDate
{
if (self.checkTimer)
{
@@ -303,30 +315,70 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
if (![self automaticallyChecksForUpdates]) return;
// How long has it been since last we checked for an update?
NSTimeInterval intervalSinceCheck;
if (usingCurrentTime) {
NSTimeInterval dateIntervalSinceCheck;
NSTimeInterval minimumEnforcedDelay;
if (usingCurrentDate) {
NSDate *lastCheckDate = [self lastUpdateCheckDate];
if (!lastCheckDate) { lastCheckDate = [NSDate distantPast]; }
intervalSinceCheck = [[NSDate date] timeIntervalSinceDate:lastCheckDate];
if (intervalSinceCheck < 0) {
NSTimeInterval wallTimeInterval = [[NSDate date] timeIntervalSinceDate:lastCheckDate];
if (wallTimeInterval < 0) {
// Last update check date is in the future and bogus, so reset it to current date
[self updateLastUpdateCheckDate];
intervalSinceCheck = 0;
// And assume a full update interval is needed
dateIntervalSinceCheck = 0;
minimumEnforcedDelay = SUMinimumMonotonicUpdateCheckInterval;
} else {
// Check the monotonic clock for an enforced minimum delay
NSTimeInterval lastMonotonicUpdateCheckTime = self.lastMonotonicUpdateCheckTime;
if (lastMonotonicUpdateCheckTime <= 0) {
// When the updater is first started, the last monotonic time may not have been updated yet.
// In this case there is no enforced minimum delay.
minimumEnforcedDelay = 0;
} else {
// Compute an enforced minimum delay based on elapsed monotonic time
// The elapsed monotonic time is more stable than wall time interval and does not include the
// amount of time while the system is asleep
NSTimeInterval currentMonotonicTime = [self currentMonotonicTimeInterval];
NSTimeInterval elapsedMonotonicTime = (currentMonotonicTime - lastMonotonicUpdateCheckTime);
if (elapsedMonotonicTime < SUMinimumMonotonicUpdateCheckInterval) {
minimumEnforcedDelay = (SUMinimumMonotonicUpdateCheckInterval - elapsedMonotonicTime);
} else {
minimumEnforcedDelay = 0;
}
}
dateIntervalSinceCheck = wallTimeInterval;
}
} else {
intervalSinceCheck = 0;
// Without using the current date, we assume a full update interval is needed
dateIntervalSinceCheck = 0;
minimumEnforcedDelay = SUMinimumMonotonicUpdateCheckInterval;
}
// Now we want to figure out how long until we check again.
NSTimeInterval delayUntilCheck, updateCheckInterval = [self updateCheckInterval];
if (updateCheckInterval < SUMinimumUpdateCheckInterval)
NSTimeInterval updateCheckInterval = [self updateCheckInterval];
if (updateCheckInterval < SUMinimumUpdateCheckInterval) {
updateCheckInterval = SUMinimumUpdateCheckInterval;
if (intervalSinceCheck < updateCheckInterval)
delayUntilCheck = (updateCheckInterval - intervalSinceCheck); // It hasn't been long enough.
else
delayUntilCheck = 0; // We're overdue! Run one now.
self.checkTimer = [NSTimer scheduledTimerWithTimeInterval:delayUntilCheck target:self selector:@selector(checkForUpdatesInBackground) userInfo:nil repeats:NO]; // Timer is non-repeating, may have invalidated itself, so we had to retain it.
}
// Now we want to figure out how long until we check again.
NSTimeInterval delayUntilCheck;
if (dateIntervalSinceCheck < updateCheckInterval) {
// It hasn't been long enough.
delayUntilCheck = (updateCheckInterval - dateIntervalSinceCheck);
} else {
// We're overdue!
delayUntilCheck = 0;
}
// Now compute delay with enforced minimum delay requirement
// The minimum delay (based on monotonic clock) is an extra layer of defense to prevent too frequent update checks
// in case the wall clock is not working properly (eg from too many system wake events, system date changes, NTP..)
NSTimeInterval delayUntilCheckWithMinimumEnforcedDelay =
(delayUntilCheck < minimumEnforcedDelay) ? minimumEnforcedDelay : delayUntilCheck;
self.checkTimer = [NSTimer scheduledTimerWithTimeInterval:delayUntilCheckWithMinimumEnforcedDelay target:self selector:@selector(checkForUpdatesInBackground) userInfo:nil repeats:NO];
}
- (void)receiveSleepNote
@@ -343,8 +395,10 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
- (void)receiveWakeNote
{
if (self.shouldRescheduleOnWake) // the reason for rescheduling the update-check timer is that NSTimer does behave as if the time the Mac spends asleep did not exist at all, which can significantly prolong the time between update checks
[self scheduleNextUpdateCheckUsingCurrentTime:YES];
// the reason for rescheduling the update-check timer is that NSTimer does behave as if the time the Mac spends asleep did not exist at all, which can significantly prolong the time between update checks
if (self.shouldRescheduleOnWake) {
[self scheduleNextUpdateCheckUsingCurrentDate:YES];
}
}
- (void)checkForUpdatesInBackground
@@ -397,7 +451,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
if( [self.delegate respondsToSelector: @selector(updaterMayCheckForUpdates:)] && ![self.delegate updaterMayCheckForUpdates: self] )
{
[self scheduleNextUpdateCheckUsingCurrentTime:NO];
[self scheduleNextUpdateCheckUsingCurrentDate:NO];
return;
}
@@ -406,7 +460,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
// If we're not given a driver at all, just schedule the next update check and bail.
if (!self.driver)
{
[self scheduleNextUpdateCheckUsingCurrentTime:NO];
[self scheduleNextUpdateCheckUsingCurrentDate:NO];
return;
}
@@ -458,7 +512,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
- (void)resetUpdateCycle
{
[[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(resetUpdateCycle) object:nil];
[self scheduleNextUpdateCheckUsingCurrentTime:YES];
[self scheduleNextUpdateCheckUsingCurrentDate:YES];
}
- (void)setAutomaticallyChecksForUpdates:(BOOL)automaticallyCheckForUpdates
+1 -1
View File
@@ -11,7 +11,7 @@
BOOL SUWebViewIsSafeURL(NSURL *url, BOOL *isAboutBlankURL)
{
NSString *scheme = url.scheme;
BOOL isAboutBlank = [url.absoluteString isEqualToString:@"about:blank"];
BOOL isAboutBlank = [url.absoluteString isEqualToString:@"about:blank"] || [url.absoluteString isEqualToString:@"about:srcdoc"];
BOOL whitelistedSafe = isAboutBlank || [@[@"http", @"https", @"macappstore", @"macappstores", @"itms-apps", @"itms-appss"] containsObject:scheme];
*isAboutBlankURL = isAboutBlank;
+1 -1
View File
@@ -47,7 +47,7 @@ class SUTestApplicationTest: XCTestCase
menuBarsQuery.menuBarItems["Sparkle Test App"].click()
}
app.dialogs["SUUpdateAlert"].buttons["Install Update"].click()
app.windows["SUUpdateAlert"].buttons["Install Update"].click()
// Give some time for the update to finish downloading / extracting
sleep(30)