diff --git a/CHANGELOG b/CHANGELOG index 4b2b5142..25b70d54 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -18,7 +18,46 @@ Please visit [Sparkle's website](http://sparkle-project.org) for more information on documentation and migration. -# 1.24.0 +# 1.26.0 + + * Flat package support from #1745 (Zorg) + * Correct generate_appcast -s command line argument usage help (Lance Lovette) + * Fix -f command line argument handling (Lance Lovette) + * Fix progress for guided pkg install (Zorg) + * Fix XQuartz update failing because NSLog caused issues (Zorg) + * Update localization (Vojtěch Koňařík) + * Various fixes to SPM logic (Jonas Zaugg) + +# 1.25.0 + + * Raise minimum system version to 10.9 (Kornel) + * Allow an appcast to prevent the new version from being installed automatically (#1688) (pierswalter) + * UI fixes + * Show check for updates button only when automatic updates are enabled (Lorena Rangel) + * Don't initialize the webview if we don't show release notes (Tobias Fonfara) + * Keep skip button available if there is a minimum autoupdate version (Zorg) + * Fix automatic updates checkbox state when not showing release notes (Zorg) + * Fix edge cases with hiding alert buttons and using "Install Later" (Zorg) + * Re-add setting WebUIDelegate fix for legacy web view (Zorg) + * Adopt WKWebView for 1.x (Zorg) + * Add auto layout constraints to SUAutomaticUpdateAlert window (Zorg) + * Made buttons wide enough to display the full text. Made window wide enough to display the widened buttons (el, fi, ru, uk) (Piers Uso Walter) + * Remove max size from update alert. (George Nachman) + * Integrate generate_keys export/import options changes from #1730 (Zorg) + * Add `—release-notes-url-prefix` support to localized release notes (Adam Tharani) + * Translations + * Enable base internalization for alert xibs (Zorg) + * Capitalizes french translation of "Vous utilisez actuellement..." ("You are currently running...") (Micah Moore) + * Fix and cleanup Hebrew, Catalan, Finnish localizations (Zorg) + * Remove non-english localizations from TestApplication (Zorg) + * Fix catch-22 Swift Package Manager binary target (Jonas Zaugg) + * Add explicit dependencies to fix Xcode linking errors (Kornel) + * Add phased rollouts feature to automatic update driver too (Zorg) + * Remove hiding skip button and retitling later button (Zorg) + * Deprecate installUpdatesIfAvailable (Zorg) + * Apply custom headers to app download (Geraint White) + + # 1.24.0 * Prioritize UserDefaults when fetching value for EnableAutomaticChecks (Nicolas Bosi) * Improve best appcast item selection handling (Ian Bytchek) diff --git a/Configurations/make-release-package.sh b/Configurations/make-release-package.sh index 5e3b1539..de5551fd 100755 --- a/Configurations/make-release-package.sh +++ b/Configurations/make-release-package.sh @@ -15,7 +15,7 @@ if [ "$ACTION" = "" ] ; then rm -rf "$CONFIGURATION_BUILD_DIR/staging-spm" rm -f "Sparkle-$CURRENT_PROJECT_VERSION.tar.xz" rm -f "Sparkle-$CURRENT_PROJECT_VERSION.tar.bz2" - rm -f "Sparkle-SPM-$CURRENT_PROJECT_VERSION.zip" + rm -f "Sparkle-for-Swift-Package-Manager.zip" mkdir -p "$CONFIGURATION_BUILD_DIR/staging" mkdir -p "$CONFIGURATION_BUILD_DIR/staging-spm" @@ -86,18 +86,36 @@ if [ "$ACTION" = "" ] ; then # Generate zip containing the xcframework for SPM cd "$CONFIGURATION_BUILD_DIR/staging-spm" #rm -rf "$CONFIGURATION_BUILD_DIR/Sparkle.xcarchive" - zip -rqyX -9 "../Sparkle-SPM-$CURRENT_PROJECT_VERSION.zip" * + zip -rqyX -9 "../Sparkle-for-Swift-Package-Manager.zip" * + + # GitHub actions set the CI environment variable to true + if [ "$CI" != true ]; then + # Get latest git tag + cd "$SRCROOT" + latest_git_tag=$(git describe --tags --abbrev=0) + # Check semantic versioning + if [[ $latest_git_tag =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]; then + echo "Tag $latest_git_tag follows semantic versioning" + else + echo "ERROR: Tag $latest_git_tag does not follow semantic versioning! SPM will not be able to resolve the repository" >&2 + exit 1 + fi + else + # Dummy placeholder for CI test builds as we don't really need to update Package.swift for building and testing purposes + latest_git_tag="CI_BUILD" + fi # Generate new Package manifest cd "$CONFIGURATION_BUILD_DIR" cp "$SRCROOT/Package.swift" "$CONFIGURATION_BUILD_DIR" if [ "$XCODE_VERSION_MAJOR" -ge "1200" ]; then # is equivalent to shasum -a 256 FILE - spm_checksum=$(swift package compute-checksum "Sparkle-SPM-$CURRENT_PROJECT_VERSION.zip") + spm_checksum=$(swift package compute-checksum "Sparkle-for-Swift-Package-Manager.zip") rm -rf ".build" - sed -E -i '' -e "/let version/ s/[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/$CURRENT_PROJECT_VERSION/" -e "/let checksum/ s/[[:xdigit:]]{64}/$spm_checksum/" "Package.swift" + sed -E -i '' -e "/let tag/ s/\".+\"/\"$latest_git_tag\"/" -e "/let version/ s/\".+\"/\"$CURRENT_PROJECT_VERSION\"/" -e "/let checksum/ s/[[:xdigit:]]{64}/$spm_checksum/" "Package.swift" cp "Package.swift" "$SRCROOT" echo "Package.swift updated with the following values:" echo "Version: $CURRENT_PROJECT_VERSION" + echo "Tag: $latest_git_tag" echo "Checksum: $spm_checksum" else echo "warning: Xcode version $XCODE_VERSION_ACTUAL does not support computing checksums for Swift Packages. Please update the Package manifest manually." diff --git a/Configurations/release-move-tag.sh b/Configurations/release-move-tag.sh index 29c7b681..7a5edbcb 100755 --- a/Configurations/release-move-tag.sh +++ b/Configurations/release-move-tag.sh @@ -10,9 +10,11 @@ if [ "$commits_since_tag" -gt 0 ]; then echo "Package.swift has not been committed and tag has not been moved." else # TODO: add sanity check to see if version is actually being updated or not? - read -p "Do you want to commit changes to Package.swift and force move tag '$latest_git_tag'? (required for Swift Package Manager release) " -n 1 -r + read -p "Do you want to commit changes to Package.swift and force move tag '$latest_git_tag'? (required for SPM release) [Y/n]" -n 1 -r echo # (optional) move to a new line - if [[ $REPLY =~ ^[Yy]$ ]]; then + if [[ $REPLY =~ ^[Nn]$ ]]; then + echo "Package.swift has not been committed and tag has not been moved." + else long_message=$(git tag -n99 -l $latest_git_tag) # gets corresponding message long_message=${long_message/$latest_git_tag} # trims tag name long_message="$(echo -e "${long_message}" | sed -e 's/^[[:space:]]*//')" # trim leading whitespace @@ -20,7 +22,5 @@ else git commit -m "Update Package.swift" git tag -fa $latest_git_tag -m "${long_message}" echo "Package.swift committed and tag '$latest_git_tag' moved." - else - echo "Package.swift has not been committed and tag has not been moved." fi fi diff --git a/Package.swift b/Package.swift index f66aa2bf..bf974d1a 100644 --- a/Package.swift +++ b/Package.swift @@ -1,9 +1,12 @@ // swift-tools-version:5.3 import PackageDescription +// Version is technically not required here, SPM doesn't check let version = "2.0.0" -let checksum = "760a229721e04427783f9c43f67a0257722173c8db7e7f7df2d1387d8a3f6dbf" -let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(version)/Sparkle-SPM-\(version).zip" +// 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 = "2.0.0" +let checksum = "ef0d0cc46421f8644f455b62537f4e4db2c97bdca5820641219a1836f3782878" +let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(tag)/Sparkle-for-Swift-Package-Manager.zip" let package = Package( name: "Sparkle",