-
Notifications
You must be signed in to change notification settings - Fork 485
/
Fastfile
54 lines (46 loc) · 1.25 KB
/
Fastfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
default_platform(:ios)
platform :ios do
before_all do
@podspec_name = "ViewAnimator.podspec"
end
lane :test do
scan(
workspace: "./Example/ViewAnimator.xcworkspace",
scheme: "ViewAnimator-Example",
device: "iPhone 8"
)
end
desc "Release a new version with a patch bump_type"
lane :patch do
release("patch")
end
desc "Release a new version with a minor bump_type"
lane :minor do
release("minor")
end
desc "Release a new version with a major bump_type"
lane :major do
release("major")
end
def release(type)
pod_lib_lint
version = version_bump_podspec(path: @podspec_name,
bump_type: type)
git_add(path: @podspec_name)
git_commit(path: [@podspec_name],
message: "#{version} release")
add_git_tag(tag: "#{version}")
push_to_git_remote
pod_push
end
lane :release_current do
version = version_get_podspec(path: @podspec_name)
if git_tag_exists(tag: version)
UI.user_error!("The tag #{version} already exists on the repo. To release a new version of the library bump the version on #{@podspec_name}")
end
pod_lib_lint
add_git_tag(tag: "#{version}")
push_git_tags
pod_push
end
end