fastlane-plugin-release 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -1
- data/lib/fastlane/plugin/release/actions/make_release_action.rb +57 -10
- data/lib/fastlane/plugin/release/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 978a20871b0aaa87dbbc22789770b28530b1b5c5f8a8c081849c68a55c913117
|
4
|
+
data.tar.gz: aef2dfccbacc01bd4011f1fcff70e24064f353ba85382964b1c3b3cea121b295
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2e7fadcfb3800062c1bd18740247510f773155be3aaea40b75aa7403a13387efd838cacdcb462d8e491ffd44215bd9e15c67658459a5f18b4675fe355f59e08
|
7
|
+
data.tar.gz: fa8ce4029f6ed67790d9b0e8629419cc53b18a46ce85b4c1162d08f2d277657d03559ffa690476b755b4096fe046b05f65087bb6de357aa1de09a95eda45159d
|
data/README.md
CHANGED
@@ -14,7 +14,17 @@ fastlane add_plugin release
|
|
14
14
|
|
15
15
|
## About release
|
16
16
|
|
17
|
-
Extends fastlane release actions. Automates the steps to create a new release for a framework.
|
17
|
+
Extends fastlane release actions. Automates the steps to create a new release for a framework. At a high level, it goes through these steps:
|
18
|
+
|
19
|
+
1) Increments podspec version
|
20
|
+
2) Increments xcodeproj version
|
21
|
+
3) Increments xcodeproj build (opt-in)
|
22
|
+
4) Commits version bumps
|
23
|
+
5) Tags release
|
24
|
+
6) Pushes to remote
|
25
|
+
7) Pushes podspec
|
26
|
+
|
27
|
+
See below for customization options...
|
18
28
|
|
19
29
|
## Actions
|
20
30
|
|
@@ -8,23 +8,54 @@ module Fastlane
|
|
8
8
|
class MakeReleaseAction < Action
|
9
9
|
|
10
10
|
def self.run(params)
|
11
|
-
|
12
11
|
other_action.ensure_git_branch(branch: params[:ensure_git_branch])
|
13
12
|
other_action.ensure_git_status_clean if params[:ensure_git_status_clean]
|
14
13
|
|
15
|
-
|
14
|
+
if params[:pre_bump]
|
15
|
+
version = bump_version(params, params[:version])
|
16
|
+
end
|
17
|
+
|
18
|
+
version = tag_and_release(params)
|
19
|
+
|
20
|
+
if params[:post_bump]
|
21
|
+
version = bump_version(params, nil)
|
22
|
+
end
|
23
|
+
|
24
|
+
version
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.bump_version(params, version)
|
16
28
|
podspec = File.expand_path(params[:podspec])
|
17
|
-
version = params[:version]
|
18
29
|
|
19
30
|
if version.nil?
|
20
|
-
version = other_action.version_bump_podspec(
|
31
|
+
version = other_action.version_bump_podspec(
|
32
|
+
path: podspec,
|
33
|
+
bump_type: params[:version_bump_type]
|
34
|
+
)
|
21
35
|
else
|
22
|
-
other_action.version_bump_podspec(
|
36
|
+
other_action.version_bump_podspec(
|
37
|
+
path: podspec,
|
38
|
+
version_number: version
|
39
|
+
)
|
40
|
+
end
|
41
|
+
|
42
|
+
xcodeproj = File.expand_path(params[:xcodeproj])
|
43
|
+
|
44
|
+
unless xcodeproj.nil?
|
45
|
+
other_action.increment_version_number(version_number: version, xcodeproj: xcodeproj)
|
46
|
+
other_action.increment_build_number(xcodeproj: xcodeproj) if params[:bump_build]
|
23
47
|
end
|
24
48
|
|
25
|
-
other_action.increment_version_number(version_number: version, xcodeproj: xcodeproj)
|
26
|
-
other_action.increment_build_number(xcodeproj: xcodeproj) if params[:bump_build]
|
27
49
|
other_action.commit_version_bump(include: [params[:podspec]])
|
50
|
+
other_action.push_to_git_remote
|
51
|
+
|
52
|
+
version
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.tag_and_release(params)
|
56
|
+
podspec = File.expand_path(params[:podspec])
|
57
|
+
version = other_action.version_get_podspec(path: podspec)
|
58
|
+
|
28
59
|
other_action.add_git_tag(tag: params[:tag_prefix] + version)
|
29
60
|
other_action.push_to_git_remote
|
30
61
|
|
@@ -36,7 +67,6 @@ module Fastlane
|
|
36
67
|
)
|
37
68
|
|
38
69
|
version
|
39
|
-
|
40
70
|
end
|
41
71
|
|
42
72
|
def self.description
|
@@ -107,6 +137,23 @@ module Fastlane
|
|
107
137
|
optional: true,
|
108
138
|
type: String
|
109
139
|
),
|
140
|
+
FastlaneCore::ConfigItem.new(
|
141
|
+
key: :post_bump,
|
142
|
+
env_name: "POST_BUMP",
|
143
|
+
default_value: false,
|
144
|
+
description: "Bump version number after tag and release",
|
145
|
+
optional: true,
|
146
|
+
type: Boolean
|
147
|
+
),
|
148
|
+
FastlaneCore::ConfigItem.new(
|
149
|
+
key: :pre_bump,
|
150
|
+
env_name: "PRE_BUMP",
|
151
|
+
conflicting_options: [:version],
|
152
|
+
default_value: false,
|
153
|
+
description: "Bump version number before tag and release",
|
154
|
+
optional: true,
|
155
|
+
type: Boolean
|
156
|
+
),
|
110
157
|
FastlaneCore::ConfigItem.new(
|
111
158
|
key: :sources,
|
112
159
|
env_name: "SOURCES",
|
@@ -126,7 +173,7 @@ module Fastlane
|
|
126
173
|
FastlaneCore::ConfigItem.new(
|
127
174
|
key: :version,
|
128
175
|
env_name: "VERSION",
|
129
|
-
conflicting_options: [:version_bump_type],
|
176
|
+
conflicting_options: [:pre_bump, :version_bump_type],
|
130
177
|
description: "Change to a specific version. This will replace the bump type value",
|
131
178
|
optional: true,
|
132
179
|
type: String
|
@@ -147,7 +194,7 @@ module Fastlane
|
|
147
194
|
key: :xcodeproj,
|
148
195
|
env_name: "XCODEPROJ",
|
149
196
|
description: "The path of the xcode project to update",
|
150
|
-
optional:
|
197
|
+
optional: true,
|
151
198
|
type: String,
|
152
199
|
verify_block: proc do |value|
|
153
200
|
UI.user_error!("Could not find xcode project at path '#{File.expand_path(value)}'") if !File.exist?(value)
|