-
Notifications
You must be signed in to change notification settings - Fork 366
/
Fastfile
124 lines (105 loc) Β· 2.77 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Customise this file, documentation can be found here:
# https://github.com/krausefx/fastlane#customise-the-fastfile
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "1.0.0"
before_all do
slack_url = get_global_value(key: "BMESlackUrl")
ENV["SLACK_URL"] = slack_url
ENV["BME_APP_TITLE"] = "Be My Eyes β Helping blind see"
end
lane :increment_build do
increment_build_number
commit_version_bump
end
lane :increment_version_patch do
increment_version_number(
bump_type: "patch"
)
commit_version_bump
end
lane :increment_version_minor do
increment_version_number(
bump_type: "minor"
)
commit_version_bump
end
lane :increment_version_major do
increment_version_number(
bump_type: "major"
)
commit_version_bump
end
lane :translate do
projectKey = get_global_value(key: "BMECrowdInProjectKey")
Helper.log.info "Update English files on CrowdIn"
sh "./../Scripts/upload_translations.py #{projectKey} -u"
Helper.log.info "Add new English files on CrowdIn"
sh "./../Scripts/upload_translations.py #{projectKey} -a"
Helper.log.info "Process translations on CrowdIn"
sh "./../Scripts/export_translations.py #{projectKey}"
Helper.log.info "Download translations from CrowdIn"
sh "./../Scripts/update_translations.py -p #{projectKey}"
Helper.log.info "Update translation keys"
sh "cd ..
Scripts/miaw -g -w --no-date -d -o BeMyEyes/Source/"
end
lane :beta_dev do
gym(
scheme: "BeMyEyes Development",
configuration: "ReleaseDev",
)
ENV["BME_APP_TITLE"] = "Be My Eyes β Alpha"
deliver(force: true)
slack(
message: "New Development (Alpha) version pushed to TestFlight.",
default_payloads: [:git_branch, :git_author]
)
end
lane :beta_staging do
gym(
scheme: "BeMyEyes Staging",
configuration: "ReleaseStaging",
)
ENV["BME_APP_TITLE"] = "Be My Eyes β Beta"
deliver(
force: true
)
slack(
message: "New Staging (Beta) version pushed to TestFlight.",
default_payloads: [:git_branch, :git_author]
)
end
lane :beta_production do
gym(
scheme: "BeMyEyes",
configuration: "Release",
)
deliver(
force: true
)
slack(
message: "New Production version pushed to TestFlight.",
default_payloads: [:git_branch, :git_author]
)
end
lane :production do
gym(
scheme: "BeMyEyes",
configuration: "Release",
)
deliver(
)
slack(
message: "New Production version pushed to App Store.",
default_payloads: [:git_branch, :git_author]
)
end
after_all do |lane|
notify "Fastlane finished '#{lane}'" # Mac OS X Notification
end
error do |lane, exception|
# Something bad happened
end