You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 19, 2024. It is now read-only.
desc"Tags a new version of R.swift.Library and releases it to cocoapods"
4
+
desc" * GITHUB_API_TOKEN must be available in environment, create one on https://github.com/settings/tokens"
5
+
desc"This lane should be run from your local machine, and will push a tag to the remote when finished."
6
+
desc" * Verifies the git branch is clean"
7
+
desc" * Ensures the lane is running on the master branch"
8
+
desc" * Pulls the remote to verify the latest the branch is up to date"
9
+
desc" * Asks for the new version number"
10
+
desc" * Commit, tag and release library to cocoapods"
11
+
desc"####Options"
12
+
desc" * **`allow_dirty_branch`**: Allows the git branch to be dirty before continuing. Defaults to false"
13
+
lane:releasedo |options|
14
+
ensure_git_branch(branch: "master")
15
+
16
+
ifoptions[:allow_dirty_branch] != true
17
+
ensure_git_status_clean
18
+
else
19
+
Helper.log.info"Skipping the 'git status clean' check!".yellow
20
+
end
21
+
22
+
git_pull
23
+
24
+
runalltests
25
+
26
+
unlessis_ci
27
+
notification(
28
+
title: "R.swift.Library release",
29
+
message: "💡 Needs your attention."
30
+
)
31
+
end
32
+
33
+
currentVersion=version_get_podspec()
34
+
Helper.log.info"Current R.swift.Library podspec version is #{currentVersion}"
35
+
36
+
bumpType=prompt(text: "What kind of release is this? (major/minor/patch/custom)".green,boolean: false,ci_input: "")
37
+
isPrerelease=false
38
+
casebumpType
39
+
when"major","minor","patch"
40
+
version_bump_podspec(bump_type: bumpType)
41
+
when"custom"
42
+
newVersion=prompt(text: "What is the new custom version number?".green,boolean: false,ci_input: "")
43
+
version_bump_podspec(version_number: newVersion)
44
+
45
+
isPrerelease=prompt(text: "Is this a prerelease version?".green,boolean: true,ci_input: "")
46
+
else
47
+
raise"Invalid release type: #{bumpType}".red
48
+
end
49
+
50
+
changelog=prompt(text: "Please provide release notes:".green,boolean: false,ci_input: "",multi_line_end_keyword: "FIN")
51
+
52
+
newVersion=version_get_podspec()
53
+
unlessprompt(text: "#{newVersion} has been prepped for release. If you have any additional changes you would like to make, please do those before continuing. Would you like to commit, tag, push and release #{newVersion} including all uncommitted changes?".green,boolean: true,ci_input:"y")
54
+
raise"Aborted by user".red
55
+
end
56
+
57
+
git_commit(
58
+
path: ".",
59
+
message: "Preparing for the #{newVersion} release"
description: "Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists",
110
+
is_string: true,
111
+
optional: true),
112
+
FastlaneCore::ConfigItem.new(key: :name,
113
+
env_name: "GITHUB_RELEASE_NAME",
114
+
description: "The name of the release",
115
+
is_string: true,
116
+
optional: true),
117
+
FastlaneCore::ConfigItem.new(key: :body,
118
+
env_name: "GITHUB_RELEASE_BODY",
119
+
description: "Text describing the contents of the tag",
120
+
is_string: true,
121
+
optional: true),
122
+
FastlaneCore::ConfigItem.new(key: :draft,
123
+
env_name: "GITHUB_RELEASE_DRAFT",
124
+
description: "true to create a draft (unpublished) release, false to create a published one",
125
+
is_string: false,
126
+
default_value: false),
127
+
FastlaneCore::ConfigItem.new(key: :prerelease,
128
+
env_name: "GITHUB_RELEASE_PRERELEASE",
129
+
description: "true to identify the release as a prerelease. false to identify the release as a full release",
0 commit comments