-
Notifications
You must be signed in to change notification settings - Fork 158
/
Fastfile
60 lines (50 loc) · 1.63 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
default_platform(:android)
platform :android do
desc "Deploy a new version to the Google Play Internal track"
lane :internal do
# Clean
sh("flutter", "clean")
# Pub get
sh("flutter", "pub", "get")
# Bumps Version Code
android_set_version_code()
# Build the app
sh("flutter", "build", "appbundle", "--dart-define=ENV=PROD")
# Gets version info
version_info = flutter_version(
pubspec_location: "../pubspec.yaml",
)
# Upload the app to Play console
supply(
track: "internal",
json_key_data: ENV["GOOGLE_SERVICE_ACCOUNT"],
skip_upload_images: true,
skip_upload_screenshots: true,
skip_upload_apk: true,
skip_upload_metadata: true,
version_name: version_info["version_name"],
version_code: android_get_version_code(),
aab: "../build/app/outputs/bundle/release/app-release.aab",
)
end
# Release a new version to Firebase Distribution
#
# It assumes that the app version is correctly set.
desc "Release app to Firebase Distribution"
lane :firebase do
# # Clean
# sh("flutter", "clean")
# # Pub get
# sh("flutter", "pub", "get")
# # Build the app
# sh("flutter", "build", "appbundle", "--dart-define=ENV=PROD")
firebase_app_distribution(
android_artifact_path: '../build/app/outputs/bundle/release/app-release.aab',
android_artifact_type: 'AAB',
app: ENV["MEMO_ANDROID_FIREBASE_APP_ID"],
service_credentials_file: "./app/google-services.json",
groups: "internal-testers",
service_credentials_file: "../firebase_distribution_service_account.json"
)
end
end