diff --git a/CHANGELOG.md b/CHANGELOG.md index 32b978a3..ee6b501a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,11 @@ All notable changes to this project will be documented in this file. Include references to issue- or pull-request numbers. -Please track any of your changes in the *Unreleased* section so they can be moved to a respective version upon release. -## Unreleased +## [2.2.1] - 2020-06-24 -Add your changes here. +- Copy additional parameters when updating JWT with keyId (#225) +- Add SPM installation to readme (#224) ## [2.2.0] - 2020-06-17 diff --git a/JOSESwift.podspec b/JOSESwift.podspec index f2462e2f..b0942653 100644 --- a/JOSESwift.podspec +++ b/JOSESwift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "JOSESwift" - s.version = "2.2.0" + s.version = "2.2.1" s.license = "Apache License, Version 2.0" s.summary = "JOSE framework for Swift" s.authors = { "Daniel Egger" => "daniel.egger@airsidemobile.com", "Carol Capek" => "carol.capek@airsidemobile.com", "Christoph Gigi Fuchs" => "christoph.fuchs@airsidemobile.com" } diff --git a/JOSESwift/Support/Info.plist b/JOSESwift/Support/Info.plist index 9a384cbc..cebd9514 100644 --- a/JOSESwift/Support/Info.plist +++ b/JOSESwift/Support/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.2.0 + 2.2.1 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Tests/Info.plist b/Tests/Info.plist index 0db46ec8..ba4db44a 100644 --- a/Tests/Info.plist +++ b/Tests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.2.0 + 2.2.1 CFBundleVersion 1 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 06eea289..860cb5fb 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,3 +1,5 @@ +require 'fileutils' + fastlane_version "2.63.0" skip_docs @@ -57,6 +59,28 @@ lane :bump do |options| new_version_xcode end +desc "Get all pull requests since the last release" +lane :pr_commits do + # Only include squashed pull requests which end with something like "(#123)". + changelog_from_git_commits(pretty:"- %s") + .split("\n") + .grep(/\(#[0-9]*\)$/) + .join("\n") +end + +lane :update_changelog do + ensure_git_status_clean + + changelog_path = "../CHANGELOG.md" + changelog_additions = "## [#{get_version_number}] - #{Time.now.strftime("%Y-%m-%d")}\n\n#{pr_commits}" + changelog = File.read(changelog_path) + changelog = changelog.sub(/##/, "#{changelog_additions}\n\n\\0") + File.write(changelog_path, changelog) + + sh("git commit -am 'Update changelog'") + ensure_git_status_clean +end + desc "Prepares a release by bumping version, formatting code, running tests, setting up a release preparation branch" lane :prepare do |options| # Ensure we prepare from current master @@ -80,9 +104,10 @@ lane :prepare do |options| # Update copyright year if needed copyright - # Run tests test + update_changelog + # Prompt for confimation promt_text = "Version #{version} has been prepared for release. "\ "Please make any additional changes that should be included in the release before continuing. "\ @@ -104,9 +129,12 @@ lane :release_pr do next end + pr_body = "'This pull request was autogenerated by fastlane. :robot: :rocket:\n" \ + "## Changes included in this release\n#{pr_commits}'" + gh_command = "gh pr create"\ " --title 'Prepare #{get_version_number(target: "JOSESwift")}'"\ - " --body 'This pull request was autogenerated by fastlane. :robot: :rocket:'" + " --body #{pr_body}" system(gh_command) end