Skip to content

Commit b5d78b8

Browse files
Danielnathan-mohemian
andauthored
Prepare 2.2.1 (#229)
* Add changelog * Add automatic changelog updates * Remove unneeded comments * Manually commit * Update changelog * Bump version * Bump changelog version * Update fastlane/Fastfile Co-authored-by: nathan-mohemian <[email protected]> * Revert "Update fastlane/Fastfile" This reverts commit e683c68. * Revert revert Co-authored-by: nathan-mohemian <[email protected]>
1 parent 15af0e0 commit b5d78b8

File tree

5 files changed

+36
-8
lines changed

5 files changed

+36
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
All notable changes to this project will be documented in this file.
44

55
Include references to issue- or pull-request numbers.
6-
Please track any of your changes in the *Unreleased* section so they can be moved to a respective version upon release.
76

8-
## Unreleased
7+
## [2.2.1] - 2020-06-24
98

10-
Add your changes here.
9+
- Copy additional parameters when updating JWT with keyId (#225)
10+
- Add SPM installation to readme (#224)
1111

1212
## [2.2.0] - 2020-06-17
1313

JOSESwift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "JOSESwift"
3-
s.version = "2.2.0"
3+
s.version = "2.2.1"
44
s.license = "Apache License, Version 2.0"
55
s.summary = "JOSE framework for Swift"
66
s.authors = { "Daniel Egger" => "[email protected]", "Carol Capek" => "[email protected]", "Christoph Gigi Fuchs" => "[email protected]" }

JOSESwift/Support/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.2.0</string>
18+
<string>2.2.1</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

Tests/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.2.0</string>
18+
<string>2.2.1</string>
1919
<key>CFBundleVersion</key>
2020
<string>1</string>
2121
</dict>

fastlane/Fastfile

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'fileutils'
2+
13
fastlane_version "2.63.0"
24

35
skip_docs
@@ -57,6 +59,28 @@ lane :bump do |options|
5759
new_version_xcode
5860
end
5961

62+
desc "Get all pull requests since the last release"
63+
lane :pr_commits do
64+
# Only include squashed pull requests which end with something like "(#123)".
65+
changelog_from_git_commits(pretty:"- %s")
66+
.split("\n")
67+
.grep(/\(#[0-9]*\)$/)
68+
.join("\n")
69+
end
70+
71+
lane :update_changelog do
72+
ensure_git_status_clean
73+
74+
changelog_path = "../CHANGELOG.md"
75+
changelog_additions = "## [#{get_version_number}] - #{Time.now.strftime("%Y-%m-%d")}\n\n#{pr_commits}"
76+
changelog = File.read(changelog_path)
77+
changelog = changelog.sub(/##/, "#{changelog_additions}\n\n\\0")
78+
File.write(changelog_path, changelog)
79+
80+
sh("git commit -am 'Update changelog'")
81+
ensure_git_status_clean
82+
end
83+
6084
desc "Prepares a release by bumping version, formatting code, running tests, setting up a release preparation branch"
6185
lane :prepare do |options|
6286
# Ensure we prepare from current master
@@ -80,9 +104,10 @@ lane :prepare do |options|
80104
# Update copyright year if needed
81105
copyright
82106

83-
# Run tests
84107
test
85108

109+
update_changelog
110+
86111
# Prompt for confimation
87112
promt_text = "Version #{version} has been prepared for release. "\
88113
"Please make any additional changes that should be included in the release before continuing. "\
@@ -104,9 +129,12 @@ lane :release_pr do
104129
next
105130
end
106131

132+
pr_body = "'This pull request was autogenerated by fastlane. :robot: :rocket:\n" \
133+
"## Changes included in this release\n#{pr_commits}'"
134+
107135
gh_command = "gh pr create"\
108136
" --title 'Prepare #{get_version_number(target: "JOSESwift")}'"\
109-
" --body 'This pull request was autogenerated by fastlane. :robot: :rocket:'"
137+
" --body #{pr_body}"
110138

111139
system(gh_command)
112140
end

0 commit comments

Comments
 (0)