Commit Graph
3802 Commits
Author SHA1 Message Date
runner 515b8259bc Update Package.swift and Sparkle.podspec for version 2.0.0-beta.1 2.0.0-beta.1 2021-08-29 03:37:49 +00:00
Mayur Pawashe edc0fd0e56 Fix issues with GitHub release workflow (#1926) 2021-08-28 18:53:42 -07:00
Mayur Pawashe b4e0dcca6c Bump 2.x project version to 2.0.0-beta.1 (#1924) 2021-08-28 17:27:42 -07:00
Tony Arnold ee679586cf Add a workflow that builds and publishes a release via GitHub Actions (#1908)
The workflow assumes changelog and version information have been updated and the tag has not been created yet before running it. When the workflow finishes, it should take you to a release page with the uploaded binaries, where you can verify the final details and publish a tag officially.

Also the following improvements were made:

* Change CURRENT_PROJECT_VERSION to represent a monotonically increasing bundle version (starting at 2000)
* Add MARKETING_VERSION to represent marketing version of Sparkle, comprised of SPARKLE_VERSION_MAJOR, SPARKLE_VERSION_MINOR, SPARKLE_VERSION_PATCH, and the new SPARKLE_VERSION_SUFFIX for pre-releases.
* Verify code signing signatures of extracted SPM zip file in make release and CI
* Generate changes to Sparkle podspec, just like the Package.swift file, based on current marketing version
* Improve format of Info.plist version strings when appending git hash info, eliminating unnecessary whitespace
* Simplify validating that XPC Service versions align with framework version
* Handle lightweight tags in addition to annotated tags in release-move-tag.sh
2021-08-26 22:42:38 -07:00
Mayur Pawashe c6f1cd4e3c Improve API header docs (#1918)
* Don't expose SPUDownloadData initializer publicly

* Make SUAppcast -init unavailable

* Fix documented default user agent string

* Improve header documentation for SUAppcast(Item) and comparators

* Update more API documentation headers

Also allow returning nil in -allowedSystemProfileKeysForUpdater:

* Clarify documentation on -allowedSystemProfileKeysForUpdater:

* Rename willIdleScheduling -> notSchedule for delegate method

* Make minor correctness fix for reading info URL
2021-08-21 11:24:23 -07:00
Mayur Pawashe 306ea26df8 Don't expose sparkleBundle (#1917) 2021-08-21 11:19:14 -07:00
Mayur Pawashe d719b92636 Remove old DSA generation script (#1922) 2021-08-21 10:01:56 -07:00
Mayur Pawashe b43b188c82 Clear resumable info-only updates when user skips them (#1920) 2021-08-20 21:34:04 -07:00
Mayur Pawashe 6b9981f567 Add generation of API docs (#1915) 2021-08-09 18:27:44 -07:00
Mayur Pawashe 34fcb8784b Support appcast selection features in generate_appcast (#1914)
Add generate_appcast options for appcast selection features

We can now supply for new update items:

* Link
* Channel name
* Last major version / minimum autoupdate version
* Phased rollout interval
* Last critical update version
* Originating informational update versions

We can also specify the maximum number of delta items to generate.

Lastly we can specify which versions to create new items for now. This allows applying flags for only specific versions, or for exceptional cases allows adding old versions that do not meet the most recent updates threshold (maxNewVersionsInFeed) -- think for updates for a prior OS or for a prior major version.

We do not override the minimum system version element on already existing items now, if the element already exists. Apps don't strictly need to specify LSMinimumSystemVersion and this allows users specifying it themselves in the feed.

The help page for generate_appcast was expanded with how the archive directory looks like, how release notes work, that old entries are kept in tact, and how extracted archives are cached..

We now write out the number of new updates written and the number of existing items updated, to make the generated result be less confusing.

Bug fixes:

* The scheme now builds for Debug so I can properly debug generate_appcast from within Xcode (distribution builds are still in Release)
* Newly generated items were appended at the end of the appcast and not necessarily inserted in the correct order (on top). As a workaround when we process existing items, we remove them, and re-add them.
* Fixed an off-by-one error for maximum number of delta files we can generate.

Fixes #1903
2021-08-08 09:07:27 -07:00
Mayur Pawashe 4f7ed347ab Adopt Swift Argument parser for Swift tools (#1913)
Also remove the deprecated usage of passing DSA key as an argument, because it can just be provided as an option (-f)
2021-08-01 08:56:18 -07:00
Zorg 9823892062 Revert modifying Package.swift 2021-07-26 15:58:20 +01:00
Zorg a22562431b Add documentation suggestion if updater fails to start 2021-07-26 15:58:20 +01:00
Zorg 4db96f6c4f Improve error reporting for DSA validation 2021-07-26 15:58:20 +01:00
Zorg 385673ff24 Populate error objects in code signing validation methods 2021-07-26 15:58:20 +01:00
Zorg c3cdbf46cb Don't allow an app to use an invalid EdDSA public key 2021-07-26 15:58:20 +01:00
Zorg 89ab067477 Populate NSError when signature validation or code sign fails 2021-07-26 15:58:20 +01:00
Mayur Pawashe 29a2fa7974 Create valid xar files (#1906)
* Create xar files with valid directory/filename structure

* Don't use file hash for determining if files are equal or not
2021-07-24 09:04:48 -07:00
Mayur PawasheandKornel cb9386a4ea Ignore symlink permissions in binary deltas (#1905)
Co-authored-by: Kornel <kornel@geekhood.net>
2021-07-23 17:42:13 -07:00
Sungbin Jo 119766a650 Fix appcast pubDate tag generation in different locales
Fixes #1900
2021-07-21 15:11:21 +01:00
Mayur Pawashe 9eba644190 Don't expose NSMenuItemValidation programmatically (#1897)
It doesn't make much sense to call this method programmatically due to it checking a specific selector. A client should set the menu item's target/action to the controller/checkForUpdates: action or call SPUUpdater methods directly.
2021-07-19 08:03:37 -07:00
Mayur Pawashe 4a87deeb7f Update changelog for Sparkle 2 (#1896)
* Update changelog for Sparkle 2

* Add more updates about appcast elements/attributes

* Clarify bestValidUpdateInAppcast method is discouraged for some cases

* Re-order changelog bullets

* Use https:// in sample links
2021-07-18 13:08:33 -07:00
Mayur Pawashe a09aad7ca0 Don't ignore -Wcompletion-handler if compiler doesn't understand it (#1894)
* Don't ignore -Wcompletion-handler if compiler doesn't understand it

Older Xcode versions threw a warning at not recognizing this warning.

* Silence WKWebView warning too
2021-07-16 07:54:19 -07:00
Mayur Pawashe 9c360b465b Add log warning for DSA deprecation and link to documentation (#1890) 2021-07-14 00:04:45 -07:00
Mayur Pawashe d9d7e310a5 Pull current date out of appcast filtering and add tests for phased group rollouts (#1889) 2021-07-11 16:47:05 -07:00
Mayur Pawashe 5677ca3f5a Avoid DSA verification if EdDSA verification passes (#1888)
If EdDSA verification passes we don't need to have DSA verification pass, and don't need to require the new update to contain a DSA signature or keys.

Also reject updates if app has EdDSA but no EdDSA signature is provided
2021-07-11 08:59:09 -07:00
Mayur Pawashe 29d4b801fc Reset skipped updates when updates are user initiated and checked (#1887)
Instead of only when a new update is found. This resets skipped updates if the user initiates a new check even if a new update is not found.
2021-07-10 08:52:33 -07:00
Mayur Pawashe 2157f78ffd Provide reason update is not found to updater delegate (#1886) 2021-07-10 08:52:06 -07:00
Mayur Pawashe e5c63b6369 Set $USER and $HOME variables when running guided pkg installers (#1884)
Set $USER and $HOME variables when running guided pkg installers

This allows pre/post install scripts to reference the user's environment correctly. The standard pkg installer GUI preserves these two variables.
2021-07-07 08:31:33 -07:00
Zorg 9f2629c892 Fix false un-initialized warning 2021-07-05 18:20:24 -07:00
Mayur Pawashe b21647bcef Allow delegate to pick no valid items (#1880)
* Allow delegate to pick no valid items

We now allow returning SUAppcastItem.emptyAppcastItem in -bestValidUpdateInAppcast:forUpdater: to indicate no update should be picked.

We preserve returning nil to indicate Sparkle handles the best appcast selection instead.

People have expressed needs for both of these decisions (and deprecated SUUpdater relies on the nil behavior).
2021-07-05 10:01:52 -07:00
Mayur Pawashe ac1bb7036c Make installing major upgrades opt-in (#1881) 2021-07-04 08:58:26 -07:00
Mayur Pawashe eecc4802db Merge pull request #1879 from sparkle-project/channels
Add support for channels
2021-06-28 19:57:58 -07:00
Zorg e0a7304a81 Remove outdated comment 2021-06-27 23:08:50 -07:00
Zorg 78a66c7dda Add channels support to sparkle-cli 2021-06-27 22:40:16 -07:00
Zorg d8f5f58468 Restrict channel names to reasonable set of characters 2021-06-27 22:06:02 -07:00
Zorg e5f1bd5e02 Fix initializing recoveryOption 2021-06-27 22:05:13 -07:00
Zorg c329319b0c Merge branch '2.x' into channels 2021-06-27 15:49:00 -07:00
Mayur Pawashe ad4ec8e3ab Merge pull request #1878 from sparkle-project/sparkle-version-element
Favor sparkle:version and sparkle:shortVersionString elements over enclosure attributes
2021-06-27 15:40:51 -07:00
Zorg 8997bad17e Update error message to lacking version element instead of attribute 2021-06-27 15:19:46 -07:00
Zorg c631a52b48 Re-order where link element is in sample appcast 2021-06-27 15:17:11 -07:00
Zorg dab34b62a0 Merge branch '2.x' into sparkle-version-element 2021-06-27 15:16:12 -07:00
Zorg c968334192 Allow only one channel in appcast feed items 2021-06-27 15:14:37 -07:00
Mayur Pawashe 6639feaafc Merge pull request #1877 from sparkle-project/update-not-found-why
Expose why new update is unavailable
2021-06-27 15:13:49 -07:00
Zorg 29c9b72be6 Refer developers to channels API where appropriate 2021-06-27 01:16:23 -07:00
Zorg 64484507b5 Guard against delegate returning nil channels incorrectly 2021-06-27 00:47:54 -07:00
Zorg bc7e2d4845 Export SUAppcastElementBetaChannel in new exported constants header 2021-06-27 00:40:33 -07:00
Zorg 9bb59b8c00 Add tests for filtering allowed channels and macOS releases 2021-06-27 00:28:09 -07:00
Zorg 267f2b82b1 Do not say no valid update could be found if there were no items
There may not be any applicable items due to sparkle:channels now.
2021-06-26 23:49:45 -07:00
Zorg 5fba1fe046 Add channels support to Sparkle
This allows developers to post updates to specific channels like for beta updates. Updaters only get notifications from channels they're allowed to be on.
2021-06-26 23:18:22 -07:00