diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m index b6643222..14db4ef4 100644 --- a/Sparkle/SUUIBasedUpdateDriver.m +++ b/Sparkle/SUUIBasedUpdateDriver.m @@ -86,7 +86,8 @@ }); }]; - if (updateItem.releaseNotesURL != nil) { + id updaterDelegate = self.updaterDelegate; + if (updateItem.releaseNotesURL != nil && (![updaterDelegate respondsToSelector:@selector(updaterShouldDownloadReleaseNotes:)] || [updaterDelegate updaterShouldDownloadReleaseNotes:self.updater])) { NSURLRequest *request = [NSURLRequest requestWithURL:updateItem.releaseNotesURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30]; id userDriver = self.userDriver; diff --git a/Sparkle/SUUpdaterDelegate.h b/Sparkle/SUUpdaterDelegate.h index ff93e6bf..6fcfb79d 100644 --- a/Sparkle/SUUpdaterDelegate.h +++ b/Sparkle/SUUpdaterDelegate.h @@ -114,6 +114,17 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey; */ - (void)updaterDidNotFindUpdate:(SUUpdater *)updater; +/*! + Returns whether the release notes (if available) should be downloaded after an update is found and shown. + + This is specifically for the releaseNotesLink element in the appcast. + + \param updater The SUUpdater instance. + + \return \c YES to download and show the release notes if available + */ +- (BOOL)updaterShouldDownloadReleaseNotes:(SUUpdater *)updater; + /*! Called immediately before downloading the specified update. diff --git a/sparkle-cli/SUCommandLineDriver.m b/sparkle-cli/SUCommandLineDriver.m index 32b10b69..8f0860eb 100644 --- a/sparkle-cli/SUCommandLineDriver.m +++ b/sparkle-cli/SUCommandLineDriver.m @@ -98,6 +98,11 @@ return self.applicationBundlePath; } +- (BOOL)updaterShouldDownloadReleaseNotes:(SUUpdater *)__unused updater +{ + return self.verbose; +} + - (void)startUpdater { NSError *updaterError = nil;