Skip to content

Commit efd7471

Browse files
committed
Add beta distribution through HockeyApp
1 parent 4c9cf83 commit efd7471

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

fastlane/Appfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
app_identifier "net.macoscope.ci-example.app-store"
2+
3+
4+
for_platform :ios do
5+
for_lane :test do
6+
app_identifier "net.macoscope.ci-example.development"
7+
end
8+
9+
for_lane :beta do
10+
app_identifier "net.macoscope.ci-example.ad-hoc"
11+
end
12+
end
13+

fastlane/Fastfile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'securerandom'
2+
13
fastlane_version "1.47.0"
24

35
default_platform :ios
@@ -8,5 +10,58 @@ platform :ios do
810
lane :test do
911
scan(device: "iPhone 6s (9.2)")
1012
end
13+
14+
desc "Submit a new Beta build to Hockey App"
15+
lane :beta do
16+
17+
keychain_name = "ci-example-certs"
18+
19+
create_keychain(
20+
name: keychain_name,
21+
default_keychain: true,
22+
unlock: true,
23+
timeout: 3600,
24+
lock_when_sleeps: true,
25+
password: SecureRandom.base64
26+
)
27+
28+
# Import distribution certificate
29+
import_certificate(
30+
certificate_path: "fastlane/Certificates/distribution.p12",
31+
certificate_password: ENV["KEY_PASSWORD"],
32+
keychain_name: keychain_name
33+
)
34+
35+
sigh(
36+
adhoc: true,
37+
username: "[email protected]",
38+
team_id: "XA8U8K5RRK",
39+
provisioning_name: "CI Example Ad Hoc",
40+
cert_id: "2T3HB2838A"
41+
)
42+
43+
increment_build_number(build_number: number_of_commits)
44+
45+
# Build
46+
gym(
47+
configuration: "Ad Hoc",
48+
sdk: "iphoneos9.2",
49+
clean: true,
50+
include_bitcode: false,
51+
include_symbols: true,
52+
use_legacy_build_api: true,
53+
export_method: "enterprise"
54+
)
55+
56+
# Push to Hockey
57+
hockey(
58+
api_token: ENV["HOCKEY_API_TOKEN"],
59+
public_identifier: ENV["HOCKEY_APP_ID"],
60+
notify: '0',
61+
status: '2',
62+
notes: last_git_commit[:message] + "\n(Uploaded automatically via fastlane)"
63+
)
64+
65+
end
1166
end
1267

0 commit comments

Comments
 (0)