-
Notifications
You must be signed in to change notification settings - Fork 14
/
Fastfile-Basic
65 lines (57 loc) · 1.53 KB
/
Fastfile-Basic
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
default_platform(:ios)
platform :ios do
before_all do
setup_circle_ci
ENV["SLACK_URL"] = ""
end
desc "Runs all the tests"
lane :test do
run_tests(
scheme: 'AwesomeProject',
device: 'iPhone 6s',
skip_slack: true,
output_types: "junit",
output_files: "results.xml"
)
end
desc "Deploy app to the iTunesConnect"
lane :deploy do
# Fetch provisioning profiles
match(
type: "adhoc",
readonly: true
)
# Build the project
build_ios_app(
scheme: 'AwesomeProject',
export_method: "ad-hoc"
)
# Upload the .ipa on TestFlight
upload_to_testflight(
username: "username@uptech.team",
app_identifier: "awesomeproject.uptech.team"
)
# Send a message to Slack notifying about the new build
version = get_version_number(xcodeproj: "AwesomeProject.xcodeproj")
slack(
message: "New iOS build *#{version}* (#{build_number}) has been submitted to HockeyApp!",
use_webhook_configured_username_and_icon: true,
success: true,
default_payloads: [],
payload: {
"Git Commit": original_commit[:message],
"Git Author": original_commit[:author]
}
)
end
# Each time the error occures, send a Slack message
error do |lane, exception, options|
slack_train_crash
slack(
message: "*#{lane}* lane crashed: #{exception}",
use_webhook_configured_username_and_icon: true,
success: false,
default_payloads: [:last_git_commit_message, :git_author]
)
end
end