Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
default_platform(:android)

platform :android do
RELEASE_AAB_PATH = File.expand_path("app/build/outputs/bundle/release/app-release.aab", Dir.pwd)

# ============================================================================
# Helper Methods
# ============================================================================
Expand Down Expand Up @@ -185,6 +183,7 @@ platform :android do
firebase_token = ENV['FIREBASE_TOKEN']
version_code = ENV['VERSION_CODE']
tester_groups = ENV['FIREBASE_TESTER_GROUPS'] || "mumuk"
aab_path = File.expand_path("../app/build/outputs/bundle/release/app-release.aab", __dir__)

unless app_id
UI.user_error!("FIREBASE_APP_ID environment variable is not set")
Expand All @@ -208,19 +207,19 @@ platform :android do
UI.message(" Token: #{firebase_token ? 'SET' : 'NOT SET'}")
UI.message(" Version Code: #{version_code}")
UI.message(" Artifact Type: AAB")
UI.message(" AAB Path: #{RELEASE_AAB_PATH}")
UI.message(" AAB Path: #{aab_path}")
UI.message(" Groups: #{tester_groups}")

unless File.exist?(RELEASE_AAB_PATH)
UI.user_error!("AAB not found at #{RELEASE_AAB_PATH}. Run the build lane first.")
unless File.exist?(aab_path)
UI.user_error!("AAB not found at #{aab_path}. Run the build lane first.")
end

# Upload to Firebase App Distribution
firebase_app_distribution(
app: app_id,
firebase_cli_token: firebase_token,
android_artifact_type: "AAB",
android_artifact_path: RELEASE_AAB_PATH,
android_artifact_path: aab_path,
groups: tester_groups,
release_notes: release_notes
)
Expand Down