/
Fastfile
64 lines (55 loc) · 2.1 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
# load variables from .env file in the root if it exists
if File.exist?('../.env')
open('../.env', 'r').readlines.each do |l|
kv = l.split('=')
ENV[kv[0]] = kv[1].chomp
end
end
lane :test_autocreation do
# app should be autocreated if not found
appcenter_upload(
api_token: ENV["TEST_APPCENTER_API_TOKEN"],
owner_name: ENV["TEST_APPCENTER_OWNER_NAME"],
app_name: "MyApplication-notfound-2",
apk: "./fastlane/app-release.apk"
)
end
lane :test_release_notes do
appcenter_upload(
api_token: ENV["TEST_APPCENTER_API_TOKEN"],
owner_name: ENV["TEST_APPCENTER_OWNER_NAME"],
app_name: "MyApplication-01",
ipa: "./fastlane/app-release.ipa",
group: ENV["TEST_APPCENTER_DISTRIBUTE_GROUP"],
release_notes: sh("cat ./test_CHANGELOG.md")
)
end
lane :test do
# appcenter_upload will read release_notes from FL_CHANGELOG
Actions.lane_context[SharedValues::FL_CHANGELOG] = 'shared changelog'
UI.message("\n\n\n=====================================\n uploading android\n=====================================")
appcenter_upload(
api_token: ENV["TEST_APPCENTER_API_TOKEN"],
owner_name: ENV["TEST_APPCENTER_OWNER_NAME"],
app_name: "MyApplication",
apk: "./fastlane/app-release.apk"
)
UI.message("\n\n\n=====================================\n uploading ios with dSYM files (not zipped) \n=====================================")
appcenter_upload(
api_token: ENV["TEST_APPCENTER_API_TOKEN"],
owner_name: ENV["TEST_APPCENTER_OWNER_NAME"],
app_name: "MyApplication-01",
ipa: "./fastlane/app-release.ipa",
group: ENV["TEST_APPCENTER_DISTRIBUTE_GROUP"],
release_notes: ENV["TEST_APPCENTER_DISTRIBUTE_RELEASE_NOTES"]
)
UI.message("\n\n\n=====================================\n uploading only dSYM files (not zipped) \n=====================================")
appcenter_upload(
api_token: ENV["TEST_APPCENTER_API_TOKEN"],
owner_name: ENV["TEST_APPCENTER_OWNER_NAME"],
app_name: "MyApplication-01",
upload_dsym_only: true,
dsym: "./fastlane/Themoji.dSYM",
release_notes: ENV["TEST_APPCENTER_DISTRIBUTE_RELEASE_NOTES"]
)
end