Skip to content

Commit 9bb4e84

Browse files
authored
Added release script as we have in other repos (#41)
* Added release script using fastlane. Added Gemfile and bundle config, Added config for pr_changelog * Added release instructions to the readme
1 parent e985c82 commit 9bb4e84

File tree

7 files changed

+423
-2
lines changed

7 files changed

+423
-2
lines changed

.bundle/config

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
BUNDLE_PATH: "bundler"

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,8 @@ DerivedData
3939

4040
# Bundler
4141
bin/
42-
bundler/
42+
bundler/
43+
44+
# Fastlane
45+
fastlane/report.xml
46+
.env

.pr_changelog.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"strategy": "squash"
3+
}

Gemfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source 'https://rubygems.org'
2+
3+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4+
5+
gem 'pr_changelog', '~> 0.4.0'
6+
gem 'fastlane', '~> 2.172.0'

Gemfile.lock

+203
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.3)
5+
addressable (2.7.0)
6+
public_suffix (>= 2.0.2, < 5.0)
7+
artifactory (3.0.15)
8+
atomos (0.1.3)
9+
aws-eventstream (1.1.0)
10+
aws-partitions (1.421.0)
11+
aws-sdk-core (3.111.2)
12+
aws-eventstream (~> 1, >= 1.0.2)
13+
aws-partitions (~> 1, >= 1.239.0)
14+
aws-sigv4 (~> 1.1)
15+
jmespath (~> 1.0)
16+
aws-sdk-kms (1.41.0)
17+
aws-sdk-core (~> 3, >= 3.109.0)
18+
aws-sigv4 (~> 1.1)
19+
aws-sdk-s3 (1.87.0)
20+
aws-sdk-core (~> 3, >= 3.109.0)
21+
aws-sdk-kms (~> 1)
22+
aws-sigv4 (~> 1.1)
23+
aws-sigv4 (1.2.2)
24+
aws-eventstream (~> 1, >= 1.0.2)
25+
babosa (1.0.4)
26+
claide (1.0.3)
27+
colored (1.2)
28+
colored2 (3.1.2)
29+
commander-fastlane (4.4.6)
30+
highline (~> 1.7.2)
31+
declarative (0.0.20)
32+
declarative-option (0.1.0)
33+
digest-crc (0.6.3)
34+
rake (>= 12.0.0, < 14.0.0)
35+
domain_name (0.5.20190701)
36+
unf (>= 0.0.5, < 1.0.0)
37+
dotenv (2.7.6)
38+
emoji_regex (3.2.1)
39+
excon (0.78.1)
40+
faraday (1.3.0)
41+
faraday-net_http (~> 1.0)
42+
multipart-post (>= 1.2, < 3)
43+
ruby2_keywords
44+
faraday-cookie_jar (0.0.7)
45+
faraday (>= 0.8.0)
46+
http-cookie (~> 1.0.0)
47+
faraday-net_http (1.0.1)
48+
faraday_middleware (1.0.0)
49+
faraday (~> 1.0)
50+
fastimage (2.2.1)
51+
fastlane (2.172.0)
52+
CFPropertyList (>= 2.3, < 4.0.0)
53+
addressable (>= 2.3, < 3.0.0)
54+
artifactory (~> 3.0)
55+
aws-sdk-s3 (~> 1.0)
56+
babosa (>= 1.0.3, < 2.0.0)
57+
bundler (>= 1.12.0, < 3.0.0)
58+
colored
59+
commander-fastlane (>= 4.4.6, < 5.0.0)
60+
dotenv (>= 2.1.1, < 3.0.0)
61+
emoji_regex (>= 0.1, < 4.0)
62+
excon (>= 0.71.0, < 1.0.0)
63+
faraday (~> 1.0)
64+
faraday-cookie_jar (~> 0.0.6)
65+
faraday_middleware (~> 1.0)
66+
fastimage (>= 2.1.0, < 3.0.0)
67+
gh_inspector (>= 1.1.2, < 2.0.0)
68+
google-api-client (>= 0.37.0, < 0.39.0)
69+
google-cloud-storage (>= 1.15.0, < 2.0.0)
70+
highline (>= 1.7.2, < 2.0.0)
71+
json (< 3.0.0)
72+
jwt (>= 2.1.0, < 3)
73+
mini_magick (>= 4.9.4, < 5.0.0)
74+
multipart-post (~> 2.0.0)
75+
plist (>= 3.1.0, < 4.0.0)
76+
rubyzip (>= 2.0.0, < 3.0.0)
77+
security (= 0.1.3)
78+
simctl (~> 1.6.3)
79+
slack-notifier (>= 2.0.0, < 3.0.0)
80+
terminal-notifier (>= 2.0.0, < 3.0.0)
81+
terminal-table (>= 1.4.5, < 2.0.0)
82+
tty-screen (>= 0.6.3, < 1.0.0)
83+
tty-spinner (>= 0.8.0, < 1.0.0)
84+
word_wrap (~> 1.0.0)
85+
xcodeproj (>= 1.13.0, < 2.0.0)
86+
xcpretty (~> 0.3.0)
87+
xcpretty-travis-formatter (>= 0.0.3)
88+
gh_inspector (1.1.3)
89+
google-api-client (0.38.0)
90+
addressable (~> 2.5, >= 2.5.1)
91+
googleauth (~> 0.9)
92+
httpclient (>= 2.8.1, < 3.0)
93+
mini_mime (~> 1.0)
94+
representable (~> 3.0)
95+
retriable (>= 2.0, < 4.0)
96+
signet (~> 0.12)
97+
google-apis-core (0.2.1)
98+
addressable (~> 2.5, >= 2.5.1)
99+
googleauth (~> 0.14)
100+
httpclient (>= 2.8.1, < 3.0)
101+
mini_mime (~> 1.0)
102+
representable (~> 3.0)
103+
retriable (>= 2.0, < 4.0)
104+
rexml
105+
signet (~> 0.14)
106+
webrick
107+
google-apis-iamcredentials_v1 (0.1.0)
108+
google-apis-core (~> 0.1)
109+
google-apis-storage_v1 (0.1.0)
110+
google-apis-core (~> 0.1)
111+
google-cloud-core (1.5.0)
112+
google-cloud-env (~> 1.0)
113+
google-cloud-errors (~> 1.0)
114+
google-cloud-env (1.4.0)
115+
faraday (>= 0.17.3, < 2.0)
116+
google-cloud-errors (1.0.1)
117+
google-cloud-storage (1.30.0)
118+
addressable (~> 2.5)
119+
digest-crc (~> 0.4)
120+
google-apis-iamcredentials_v1 (~> 0.1)
121+
google-apis-storage_v1 (~> 0.1)
122+
google-cloud-core (~> 1.2)
123+
googleauth (~> 0.9)
124+
mini_mime (~> 1.0)
125+
googleauth (0.15.0)
126+
faraday (>= 0.17.3, < 2.0)
127+
jwt (>= 1.4, < 3.0)
128+
memoist (~> 0.16)
129+
multi_json (~> 1.11)
130+
os (>= 0.9, < 2.0)
131+
signet (~> 0.14)
132+
highline (1.7.10)
133+
http-cookie (1.0.3)
134+
domain_name (~> 0.5)
135+
httpclient (2.8.3)
136+
jmespath (1.4.0)
137+
json (2.5.1)
138+
jwt (2.2.2)
139+
memoist (0.16.2)
140+
mini_magick (4.11.0)
141+
mini_mime (1.0.2)
142+
multi_json (1.15.0)
143+
multipart-post (2.0.0)
144+
nanaimo (0.3.0)
145+
naturally (2.2.1)
146+
os (1.1.1)
147+
plist (3.6.0)
148+
pr_changelog (0.4.0)
149+
public_suffix (4.0.6)
150+
rake (13.0.3)
151+
representable (3.0.4)
152+
declarative (< 0.1.0)
153+
declarative-option (< 0.2.0)
154+
uber (< 0.2.0)
155+
retriable (3.1.2)
156+
rexml (3.2.4)
157+
rouge (2.0.7)
158+
ruby2_keywords (0.0.4)
159+
rubyzip (2.3.0)
160+
security (0.1.3)
161+
signet (0.14.1)
162+
addressable (~> 2.3)
163+
faraday (>= 0.17.3, < 2.0)
164+
jwt (>= 1.5, < 3.0)
165+
multi_json (~> 1.10)
166+
simctl (1.6.8)
167+
CFPropertyList
168+
naturally
169+
slack-notifier (2.3.2)
170+
terminal-notifier (2.0.0)
171+
terminal-table (1.8.0)
172+
unicode-display_width (~> 1.1, >= 1.1.1)
173+
tty-cursor (0.7.1)
174+
tty-screen (0.8.1)
175+
tty-spinner (0.9.3)
176+
tty-cursor (~> 0.7)
177+
uber (0.1.0)
178+
unf (0.1.4)
179+
unf_ext
180+
unf_ext (0.0.7.7)
181+
unicode-display_width (1.7.0)
182+
webrick (1.7.0)
183+
word_wrap (1.0.0)
184+
xcodeproj (1.19.0)
185+
CFPropertyList (>= 2.3.3, < 4.0)
186+
atomos (~> 0.1.3)
187+
claide (>= 1.0.2, < 2.0)
188+
colored2 (~> 3.1)
189+
nanaimo (~> 0.3.0)
190+
xcpretty (0.3.0)
191+
rouge (~> 2.0.7)
192+
xcpretty-travis-formatter (1.0.1)
193+
xcpretty (~> 0.2, >= 0.0.7)
194+
195+
PLATFORMS
196+
ruby
197+
198+
DEPENDENCIES
199+
fastlane (~> 2.172.0)
200+
pr_changelog (~> 0.4.0)
201+
202+
BUNDLED WITH
203+
2.1.4

README.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,38 @@ When using `.bottomSheetAutomatic` to calculate the content height and your view
8282

8383
### BottomSheetTransitioningDelegate
8484

85-
To avoid "glitches" you might need to keep a strong reference to the transitioning delegate (`BottomSheetTransitioningDelegate`) until the bottom sheet animation is complete.
85+
To avoid "glitches" you might need to keep a strong reference to the transitioning delegate (`BottomSheetTransitioningDelegate`) until the bottom sheet animation is complete.
86+
87+
## Create new releases
88+
89+
### Setup
90+
- Install dependencies with `bundle install` (dependencies will be installed in `./bundler`)
91+
- Fastlane will use the GitHub API, so make sure to create a personal access token [here](https://github.com/settings/tokens) and place it within an environment variable called **`FINN_GITHUB_COM_ACCESS_TOKEN`**.
92+
- When creating a token, you only need to give access to the scope `repo`.
93+
- There are multiple ways to make an environment variable, for example by using a `.env` file or adding it to `.bashrc`/`.bash_profile`). Don't forget to run `source .env` (for whichever file you set the environment variables in) if you don't want to restart your shell.
94+
- Run `bundle exec fastlane verify_environment_variable` to see if it is configured correctly.
95+
- Run `bundle exec fastlane verify_ssh_to_github` to see if ssh to GitHub is working.
96+
97+
### Make release
98+
- Run `bundle exec fastlane` and choose appropriate lane. Follow instructions, you will be asked for confirmation before all remote changes.
99+
- After the release has been created you can edit the description on GitHub by using the printed link.
100+
101+
## Interesting things
102+
103+
### Changelogs
104+
105+
This project has a `Gemfile` that specify some development dependencies, one of those is `pr_changelog` which is a tool that helps you to generate changelogs from the Git history of the repo. You install this by running `bundle install`.
106+
107+
To get the changes that have not been released yet just run:
108+
109+
```
110+
$ pr_changelog
111+
```
112+
113+
If you want to see what changes were released in the last version, run:
114+
115+
```
116+
$ pr_changelog --last-release
117+
```
118+
119+
You can always run the command with the `--help` flag when needed.

0 commit comments

Comments
 (0)