-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathfirebase-upload.sh
More file actions
executable file
·47 lines (37 loc) · 1.32 KB
/
firebase-upload.sh
File metadata and controls
executable file
·47 lines (37 loc) · 1.32 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# SUMMARY
# Uploads an exported .ipa for SimplyE or Open eBooks to Firebase.
#
# SYNOPSIS
# firebase-upload.sh <app_name>
#
# PARAMETERS
# See xcode-settings.sh for possible parameters.
#
# USAGE
# Run this script from the root of Simplified-iOS repo, e.g.:
#
# ./scripts/firebase-upload simplye
source "$(dirname $0)/xcode-settings.sh"
echo "Uploading $ARCHIVE_NAME binary to Firebase..."
CERTIFICATES_PATH="./Certificates"
FIREBASE_TOKEN=$(head -n 1 "$CERTIFICATES_PATH/Firebase/token.txt") ||
fatal "could not read firebase token from Certificates repo"
FIREBASE_APP_ID=`/usr/libexec/PlistBuddy -c "Print :GOOGLE_APP_ID" "$CERTIFICATES_PATH/$APP_NAME_FOLDER/iOS/GoogleService-Info.plist"`
# find ipa
if [[ -d "$ADHOC_EXPORT_PATH" ]]; then
IPA_PATH="$ADHOC_EXPORT_PATH/$APP_NAME.ipa"
else
fatal "Unable to upload to firebase: missing ad-hoc export!"
fi
# Disabling the IPA upload to firebase because we encountered authentication error,
# possibly due to `token` authentication is deprecated.
# upload app binary
#echo "Using ipa at $IPA_PATH"
#firebase appdistribution:distribute \
# --token "${FIREBASE_TOKEN}" \
# --app "${FIREBASE_APP_ID}" \
# "${IPA_PATH}"
# upload symbols
./scripts/firebase-upload-symbols.sh "$APPNAME_PARAM" "$DSYMS_PATH"
echo "firebase-upload.sh: Completed with return code $?"