forked from microsoft/fastlane-plugin-appcenter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFastfile
116 lines (99 loc) · 3.88 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
# 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"),
release_notes_clipping: false,
release_notes_link: "https://raw.githubusercontent.com/Microsoft/fastlane-plugin-appcenter/master/README.md"
)
end
lane :test_group_names do
appcenter_upload(
api_token: ENV["TEST_APPCENTER_API_TOKEN"],
owner_name: ENV["TEST_APPCENTER_OWNER_NAME"],
app_name: "MyApplication",
apk: "./fastlane/app-release.apk",
group: "Group%20with%20space"
)
appcenter_upload(
api_token: ENV["TEST_APPCENTER_API_TOKEN"],
owner_name: ENV["TEST_APPCENTER_OWNER_NAME"],
app_name: "MyApplication",
apk: "./fastlane/app-release.apk",
group: "Group with space"
)
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"]
)
UI.message("\n\n\n=====================================\n uploading to multiple groups \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",
group: ENV["TEST_APPCENTER_DISTRIBUTE_GROUPS"]
)
UI.message("\n\n\n=====================================\n uploading mandatory release \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",
group: ENV["TEST_APPCENTER_DISTRIBUTE_GROUP"],
mandatory_update: true
)
UI.message("\n\n\n=====================================\n uploading release with email notification \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",
group: ENV["TEST_APPCENTER_DISTRIBUTE_GROUP"],
notify_testers: true
)
end