-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappDistributionUploadRelease.ps1
More file actions
31 lines (23 loc) · 1.08 KB
/
appDistributionUploadRelease.ps1
File metadata and controls
31 lines (23 loc) · 1.08 KB
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
# appDistributionUploadDebug.ps1
# This script first builds the debug version of the Android application
# and then uploads it to Firebase App Distribution.
Write-Host "Starting debug build and App Distribution upload..."
# Step 1: Build the debug version of the application
# Using 'gradlew' (Gradle Wrapper) ensures that Gradle is used from the project's wrapper,
# which is generally recommended for consistency across different environments.
Write-Host "Building debug APK..."
./gradlew assembleRelease
# Check if the build was successful
if ($LASTEXITCODE -ne 0) {
Write-Error "Debug build failed. Aborting App Distribution upload."
exit 1 # Exit with an error code
}
Write-Host "Debug build successful. Proceeding with App Distribution upload."
# Step 2: Upload the debug APK to Firebase App Distribution
./gradlew appDistributionUploadRelease
# Check if the upload was successful
if ($LASTEXITCODE -ne 0) {
Write-Error "App Distribution upload for debug failed."
exit 1 # Exit with an error code
}
Write-Host "Debug APK successfully uploaded to Firebase App Distribution."